15 #ifndef __vtkMRMLStorageNode_h 16 #define __vtkMRMLStorageNode_h 37 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
58 virtual
int ReadData(
vtkMRMLNode *refNode,
bool temporaryFile = false);
68 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
76 virtual const
char* GetNodeTagName() VTK_OVERRIDE = 0;
80 vtkSetStringMacro(FileName);
81 vtkGetStringMacro(FileName);
88 virtual
std::
string GetSupportedFileExtension(const
char* fileName = NULL,
bool includeReadable = true,
bool includeWriteable = true);
92 const
char *GetNthFileName(
int n) const;
96 vtkBooleanMacro(UseCompression,
int);
97 vtkGetMacro(UseCompression,
int);
98 vtkSetMacro(UseCompression,
int);
102 vtkSetStringMacro(URI);
103 vtkGetStringMacro(URI);
110 virtual
void ProcessMRMLEvents ( vtkObject *caller,
unsigned long event,
void *callData ) VTK_OVERRIDE;
131 vtkGetMacro(ReadState,
int);
132 vtkSetMacro(ReadState,
int);
139 const char *GetStateAsString(
int state);
144 vtkGetMacro(WriteState,
int);
145 vtkSetMacro(WriteState,
int);
157 std::string GetFullNameFromFileName();
158 std::string GetFullNameFromNthFileName(
int n);
171 virtual int SupportedFileType(
const char *fileName);
176 virtual vtkStringArray* GetSupportedReadFileTypes();
181 virtual vtkStringArray* GetSupportedWriteFileTypes();
188 virtual void GetFileExtensionsFromFileTypes(vtkStringArray* inputFileTypes, vtkStringArray* outputFileExtensions);
192 vtkSetStringMacro(WriteFileFormat);
193 vtkGetStringMacro(WriteFileFormat);
197 unsigned int AddFileName (
const char *fileName);
200 void ResetFileNameList();
206 return (
int)this->FileNameList.size();
212 int FileNameIsInList(
const char *fileName);
216 unsigned int AddURI(
const char *uri);
220 const char *GetNthURI(
int n);
230 return (
int)this->URIList.size();
235 void SetDataDirectory(
const char* dataDirName);
238 void SetURIPrefix(
const char *uriPrefix);
242 virtual const char* GetDefaultWriteFileExtension();
248 virtual void SetDefaultWriteFileExtension(
const char* ext);
252 void ResetNthFileName(
int n,
const char *fileName);
255 void ResetNthURI(
int n,
const char *uri);
261 int IsFilePathRelative(
const char * filepath);
267 const char *GetAbsoluteFilePath(
const char *inputPath);
271 vtkSetStringMacro(TempFileName);
272 vtkGetStringMacro(TempFileName);
277 void InvalidateFile();
281 vtkTimeStamp GetStoredTime();
289 virtual bool CanReadInReferenceNode(
vtkMRMLNode* refNode) = 0;
295 virtual bool CanWriteFromReferenceNode(
vtkMRMLNode* refNode);
305 static std::string GetLowercaseExtensionFromFileName(
const std::string& filename);
309 std::string GetFileNameWithoutExtension(
const char* fileName = NULL);
312 vtkSetMacro(CompressionParameter, std::string);
313 vtkGetMacro(CompressionParameter, std::string);
316 virtual std::vector<std::string> GetCompressionPresetDisplayNames();
319 virtual std::string GetCompressionParameterFromDisplayName(
const std::string& name);
322 virtual std::string GetDisplayNameFromCompressionParameter(
const std::string& preset);
325 virtual int GetNumberOfCompressionPresets();
336 : CompressionParameter(parameter)
346 virtual const std::vector<CompressionPreset> GetCompressionPresets();
357 virtual int ReadDataInternal(
vtkMRMLNode* refNode);
362 virtual int WriteDataInternal(
vtkMRMLNode* refNode);
400 virtual void InitializeSupportedReadFileTypes();
404 virtual void InitializeSupportedWriteFileTypes();
409 virtual void UpdateCompressionPresets();
void SetWriteStateCancelled()
void SetWriteStateScheduled()
void SetWriteStateTransferring()
void SetReadStateScheduled()
vtkWeakPointer< vtkMRMLStorableNode > LastFoundStorableNode
std::vector< std::string > FileNameList
An array of file names, should contain the FileName but may not
virtual void ConfigureForDataExchange()
std::string CompressionParameter
int GetNumberOfFileNames() const
See how many file names were generated during ExecuteInformation
void SetReadStatePending()
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
void SetWriteStateTransferDone()
vtkStringArray * SupportedReadFileTypes
List of supported extensions to read in.
MRML node to represent a 3D surface model.
void SetReadStateTransferring()
vtkStringArray * SupportedWriteFileTypes
void SetReadStateTransferDone()
void SetWriteStatePending()
A superclass for other storage nodes.
vtkURIHandler * URIHandler
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
std::string DefaultWriteFileExtension
List of supported extensions to write in.
const char * GetWriteStateAsString()
vtkTimeStamp * StoredTime
std::vector< std::string > URIList
An array of URI's, should contain the URI but may not
CompressionPreset(const std::string ¶meter, const std::string &name)
void SetReadStateCancelled()
Abstract Superclass for all specific types of MRML nodes.
std::string CompressionParameter
std::vector< CompressionPreset > CompressionPresets
const char * GetReadStateAsString()
int GetNumberOfURIs()
Return how many uri names this storage node holds in it's list