13 #ifndef mitkFileWriter_h
14 #define mitkFileWriter_h
17 #include <itkProcessObject.h>
99 using ProcessObject::SetInput;
140 #define mitkWriterMacro \
142 virtual void Write() override \
145 if (this->GetInput() == nullptr) \
148 itkExceptionMacro(<< "Write:Please specify an input!"); \
152 this->UpdateOutputInformation(); \
153 (*(this->GetInputs().begin()))->SetRequestedRegionToLargestPossibleRegion(); \
154 this->PropagateRequestedRegion(nullptr); \
155 this->UpdateOutputData(nullptr); \
158 virtual void Update() override { Write(); }
Base of all data objects.
Class for nodes of the DataTree.
Interface class of writers that write data to files.
virtual std::string GetFileExtension()
Return the extension to be added to the filename.
void SetInput(BaseData *data)
virtual std::string GetPossibleFileExtensionsAsString()
possible file extensions for the data type associated with the writer as string
virtual bool GetWriteToMemory()
virtual const char * GetFilePrefix() const =0
Get the specified file prefix for the file(s) to write.
virtual void ReleaseMemory()
CAUTION: It's up to the user to call this function to release the memory buffer after use in case the...
mitkClassMacroItkParent(FileWriter, itk::ProcessObject)
virtual std::string GetSupportedBaseData() const =0
bool IsExtensionValid(std::string extension)
Checks if given extension is valid for file writer.
virtual bool CanWriteToMemory()
Specifies, whether the file writer also can write a file to a memory buffer.
virtual const char * GetFileName() const =0
Get the specified the file to write.
virtual void SetFileName(const char *aFileName)=0
Specify the file to write.
virtual unsigned int GetMemorySize()
To be used along with a call of SetWriteToMemory(true). This returns the size of the memory buffer wh...
virtual const char * GetMemoryPointer()
To be used along with a call of SetWriteToMemory(true). This returns the memory buffer where the file...
virtual std::vector< std::string > GetPossibleFileExtensions()=0
Return the possible file extensions for the data type associated with the writer.
virtual bool CanWriteDataType(DataNode *)
Check if the Writer can write this type of data of the DataTreenode.
unsigned int m_MemoryBufferSize
virtual void SetWriteToMemory(bool write)
Set/Get functions to advise the file writer to use tis internal memory array as file writing destinat...
virtual std::string GetWritenMIMEType()
Return the MimeType of the saved File.
virtual void SetFilePattern(const char *aFilePattern)=0
Specified file pattern for the file(s) to write. The sprintf format used to build filename from FileP...
virtual void SetFilePrefix(const char *aFilePrefix)=0
Specify file prefix for the file(s) to write.
virtual const char * GetFilePattern() const =0
Get the specified file pattern for the file(s) to write. The sprintf format used to build filename fr...
Find image slices visible on a given plane.