17 #ifndef FILEWRITER_H_HEADER_INCLUDED
18 #define FILEWRITER_H_HEADER_INCLUDED
21 #include <itkProcessObject.h>
38 virtual const char *GetFileName()
const = 0;
44 virtual void SetFileName(
const char *aFileName) = 0;
51 virtual const char *GetFilePrefix()
const = 0;
58 virtual void SetFilePrefix(
const char *aFilePrefix) = 0;
66 virtual const char *GetFilePattern()
const = 0;
74 virtual void SetFilePattern(
const char *aFilePattern) = 0;
78 virtual std::string GetFileExtension();
82 bool IsExtensionValid(std::string extension);
86 virtual std::vector<std::string> GetPossibleFileExtensions() = 0;
90 virtual std::string GetPossibleFileExtensionsAsString();
95 virtual bool CanWriteDataType(
DataNode *);
99 virtual std::string GetWritenMIMEType();
101 virtual std::string GetSupportedBaseData()
const = 0;
103 using ProcessObject::SetInput;
106 virtual void Write() = 0;
111 virtual bool CanWriteToMemory();
116 virtual void SetWriteToMemory(
bool write);
117 virtual bool GetWriteToMemory();
122 virtual const char *GetMemoryPointer();
127 virtual unsigned int GetMemorySize();
132 virtual void ReleaseMemory();
144 #define mitkWriterMacro \
146 virtual void Write() override \
149 if (this->GetInput() == NULL) \
152 itkExceptionMacro(<< "Write:Please specify an input!"); \
156 this->UpdateOutputInformation(); \
157 (*(this->GetInputs().begin()))->SetRequestedRegionToLargestPossibleRegion(); \
158 this->PropagateRequestedRegion(NULL); \
159 this->UpdateOutputData(NULL); \
162 virtual void Update() override { Write(); }
Base of all data objects.
unsigned int m_MemoryBufferSize
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Interface class of writers that write data to files.
Class for nodes of the DataTree.