| SIVIC API
    0.9.26
    | 
#include <svkDataModel.h>
 
  
 | Public Member Functions | |
| vtkTypeMacro (svkDataModel, vtkObject) | |
| svkDataModel () | |
| Constructor.  More... | |
| ~svkDataModel () | |
| Destructor.  More... | |
| virtual bool | AddDataObject (string objectName, svkImageData *dataObject) | 
| virtual bool | RemoveDataObject (string objectName) | 
| virtual void | RemoveAllDataObjects () | 
| virtual bool | ChangeDataObject (string objectName, svkImageData *dataObject) | 
| virtual bool | ReplaceDataFromFile (string objectName, string fileName) | 
| virtual svkImageData * | GetDataObject (string objectName) | 
| virtual map< string, svkImageData * > | GetAllDataObjects () | 
| virtual bool | SetDataFileName (string objectName, string fileName) | 
| virtual string | GetDataFileName (string objectName) | 
| virtual svkImageData * | LoadFile (string fileName, bool onlyOneInputFile=false) | 
| svkDcmHeader * | GetDcmHeader (string fileName) | 
| virtual svkImageData * | AddFileToModel (string objectName, string fileName, bool onlyOneInputFile=false) | 
| virtual bool | WriteToFile (string objectName, string fileName) | 
| virtual bool | WriteToFile (svkImageData *data, const char *fileName) | 
| virtual map< string, void * > | GetModelState () | 
| virtual void | SetModelState (map< string, void * > modelState) | 
| virtual bool | AddState (string stateName, void *stateValue) | 
| virtual bool | ChangeState (string stateName, void *stateValue) | 
| virtual void * | GetState (string stateName) | 
| virtual bool | DataExists (string objectName) | 
| virtual bool | StateExists (string stateName) | 
| string | GetProgressText () | 
| void | SetProgressText (string progressText) | 
| Static Public Member Functions | |
| static svkDataModel * | New () | 
The purpose of the DataModel class is two fold. The first is to maintain a hash of svkImageData objects that can be accessed and modified by any "views". The second is to maintain a hash of states that are to be shared between "views". The DataViewControllers observe the DataModel and can respond if relevant changes are made.
| svkDataModel | ( | ) | 
Constructor.
| ~svkDataModel | ( | ) | 
Destructor.
| 
 | virtual | 
Adds a data object to the data hash. If the object already exists, it will return 0 and will not modify the hash.
| objectName | the name of the object you wish to add | 
| dataObject | the pointer to the svkImageData object you wish to add | 
References svkDataModel::DataExists().
Referenced by svkDataModel::AddFileToModel().
| 
 | virtual | 
Adds a file into the data hash.
| objectName | the name you want to give the new object | 
| fileName | the file from which you want to create the new object | 
References svkDataModel::AddDataObject(), svkDataModel::ChangeDataObject(), svkDataModel::DataExists(), svkDataModel::LoadFile(), and svkDataModel::SetDataFileName().
Referenced by svkDataModel::ReplaceDataFromFile().
| 
 | virtual | 
Adds a state to the hash. If the state is already present the method returns 0 without modifying the hash.
| stateName | the name of the new state you want to add | 
| stateValue | a void pointer to the data representing the state | 
References svkDataModel::StateExists().
| 
 | virtual | 
Changes a given data object in the hash to be associated with a new data object. If the object is not found, method returns 0;
| objectName | the name of the object you wish to change | 
| dataObject | a pointer to the net svkImageData object | 
References svkDataModel::DataExists().
Referenced by svkDataModel::AddFileToModel().
| 
 | virtual | 
Changes a state in the state hash. If the state does not exist, zero is returned and the hash is not modified.
| stateName | the name of the state you wish to change | 
| stateValue | a void pointer to the data representing the state | 
References svkDataModel::StateExists().
| 
 | virtual | 
Checks to see if a given data object exists or not.
| objectName | the name of the object you are looking for | 
Referenced by svkDataModel::AddDataObject(), svkDataModel::AddFileToModel(), svkDataModel::ChangeDataObject(), svkDataModel::GetDataFileName(), svkDataModel::GetDataObject(), svkDataModel::RemoveDataObject(), svkDataModel::ReplaceDataFromFile(), and svkDataModel::SetDataFileName().
| 
 | virtual | 
Returns the hash of data objects in the model.
| 
 | virtual | 
References svkDataModel::DataExists().
| 
 | virtual | 
Returns data object associated with a given name in the data hash. If the hash does not contain that key, it returns NULL.
| objectName | the name of the object you want to get | 
References svkDataModel::DataExists().
Referenced by svkDataModel::ReplaceDataFromFile().
| svkDcmHeader * GetDcmHeader | ( | string | fileName | ) | 
Utility method for getting tags the header of a specific file.
References svkImageData::GetDcmHeader(), and svkDataModel::LoadFile().
| 
 | virtual | 
Gets the entire state hash.
| string GetProgressText | ( | ) | 
| 
 | virtual | 
Gets the state value for the given key. Returns NULL if the key is not found.
| stateName | the name of the state you wish to get | 
References svkDataModel::StateExists().
| 
 | virtual | 
Loads a file into an svkImageData object and returns a pointer to it. If the file cannot be loaded, the program exits.
NOTE!!! The result of this method needs be registered before another dataset can be loaded, otherwise loading a second dataset will DELETE the first!
| fileName | the name of the file to load | 
References svkImageReaderFactory::CreateImageReader2(), svkImageDataFactory::CreateInstance(), svkImageReader2::GetOutput(), svkImageReaderFactory::New(), svkImageReader2::OnlyReadOneInputFile(), and svkImageData::ShallowCopy().
Referenced by svkDataModel::AddFileToModel(), and svkDataModel::GetDcmHeader().
| 
 | static | 
| 
 | virtual | 
References svkDataModel::RemoveDataObject().
| 
 | virtual | 
Removes a given data object from the data hash. If the object is not present, method returns 0.
| objectName | the name of the object you wish to remove | 
References svkDataModel::DataExists().
Referenced by svkDataModel::RemoveAllDataObjects().
| 
 | virtual | 
Replaces a data object in the data hash, with a new data object loaded from the give file.
| objectName | the name of the object you wish to replace | 
| fileName | the name of the file you wish to load for the give name | 
References svkDataModel::AddFileToModel(), svkDataModel::DataExists(), and svkDataModel::GetDataObject().
| 
 | virtual | 
References svkDataModel::DataExists().
Referenced by svkDataModel::AddFileToModel().
| 
 | virtual | 
Sets the entire state hash.
| modelState | the new state hash | 
| void SetProgressText | ( | string | progressText | ) | 
| 
 | virtual | 
Checks to see if a given state exists or not.
| stateName | the name of the state you are looking for | 
Referenced by svkDataModel::AddState(), svkDataModel::ChangeState(), and svkDataModel::GetState().
| vtkTypeMacro | ( | svkDataModel | , | 
| vtkObject | |||
| ) | 
| 
 | virtual | 
Not yet implemented, returns 0.
| 
 | virtual | 
Not yet implemented, returns 0.
References svkImageWriterFactory::CreateImageWriter(), svkImageWriterFactory::DDF, svkImageWriterFactory::DICOM_MRS, svkImageWriterFactory::New(), and svkImageWriter::SetFileName().
 1.8.5
 1.8.5