Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
XML-based writer for mitk::PlanarFigures. More...
#include <mitkPlanarFigureWriter.h>
Public Types | |
typedef mitk::PlanarFigure | InputType |
typedef InputType::Pointer | InputTypePointer |
![]() | |
typedef FileWriterWithInformation | Self |
typedef FileWriter | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
![]() | |
typedef FileWriter | Self |
typedef itk::ProcessObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
mitkClassMacro (PlanarFigureWriter, mitk::FileWriter) | |
Pointer | Clone () const |
virtual void | SetFileName (const char *_arg) |
virtual const char * | GetFileName () const |
virtual void | SetFilePrefix (const char *_arg) |
virtual const char * | GetFilePrefix () const |
virtual void | SetFilePattern (const char *_arg) |
virtual const char * | GetFilePattern () const |
void | SetInput (InputType *input) |
void | SetInput (const unsigned int &num, InputType *input) |
PlanarFigure * | GetInput () |
PlanarFigure * | GetInput (const unsigned int &num) |
std::vector< std::string > | GetPossibleFileExtensions () override |
Return the possible file extensions for the data type associated with the writer. More... | |
std::string | GetFileExtension () override |
Return the extension to be added to the filename. More... | |
bool | CanWriteDataType (DataNode *) override |
Check if the Writer can write the Content of the. More... | |
std::string | GetWritenMIMEType () override |
Return the MimeType of the saved File. More... | |
virtual void | SetInput (DataNode *) |
Set the DataTreenode as Input. Important: The Writer always have a SetInput-Function. More... | |
std::string | GetSupportedBaseData () const override |
virtual bool | GetSuccess () const |
const char * | GetDefaultFilename () override |
const char * | GetFileDialogPattern () override |
const char * | GetDefaultExtension () override |
bool | CanWriteBaseDataType (BaseData::Pointer data) override |
void | DoWrite (BaseData::Pointer data) override |
void | ReleaseMemory () override |
CAUTION: It's up to the user to call this function to release the memory buffer after use in case the file writer has written to its memory array. See mitkFileWriter base class. More... | |
![]() | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
![]() | |
bool | IsExtensionValid (std::string extension) |
Checks if given extension is valid for file writer. More... | |
virtual std::string | GetPossibleFileExtensionsAsString () |
possible file extensions for the data type associated with the writer as string More... | |
void | SetInput (BaseData *data) |
virtual void | Write ()=0 |
virtual bool | CanWriteToMemory () |
Specifies, whether the file writer also can write a file to a memory buffer. More... | |
virtual void | SetWriteToMemory (bool write) |
Set/Get functions to advise the file writer to use tis internal memory array as file writing destination. More... | |
virtual bool | GetWriteToMemory () |
virtual const char * | GetMemoryPointer () |
To be used along with a call of SetWriteToMemory(true). This returns the memory buffer where the file was written. More... | |
virtual unsigned int | GetMemorySize () |
To be used along with a call of SetWriteToMemory(true). This returns the size of the memory buffer where the file was written. More... | |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static const char * | GetStaticNameOfClass () |
![]() | |
static const char * | GetStaticNameOfClass () |
Public Attributes | |
mitkWriterMacro | |
Protected Member Functions | |
PlanarFigureWriter () | |
~PlanarFigureWriter () override | |
void | GenerateData () override |
virtual void | ResizeInputs (const unsigned int &num) |
TiXmlElement * | CreateXMLVectorElement (const char *name, itk::FixedArray< mitk::ScalarType, 3 > v) |
creates a TinyXML element that contains x, y, and z values More... | |
![]() | |
FileWriter () | |
~FileWriter () override | |
Protected Attributes | |
std::string | m_FileName |
std::string | m_FilePrefix |
std::string | m_FilePattern |
std::string | m_Extension |
std::string | m_MimeType |
bool | m_Success |
![]() | |
bool | m_CanWriteToMemory |
bool | m_WriteToMemory |
char * | m_MemoryBuffer |
unsigned int | m_MemoryBufferSize |
XML-based writer for mitk::PlanarFigures.
XML-based writer for mitk::PlanarFigures.
Definition at line 30 of file mitkPlanarFigureWriter.h.
Definition at line 39 of file mitkPlanarFigureWriter.h.
Definition at line 43 of file mitkPlanarFigureWriter.h.
|
protected |
Constructor.
Definition at line 18 of file mitkPlanarFigureWriter.cpp.
References mitk::FileWriter::m_CanWriteToMemory.
|
overrideprotected |
Virtual destructor.
Definition at line 33 of file mitkPlanarFigureWriter.cpp.
|
inlineoverridevirtual |
Implements mitk::FileWriterWithInformation.
Definition at line 138 of file mitkPlanarFigureWriter.h.
|
overridevirtual |
Check if the Writer can write the Content of the.
Reimplemented from mitk::FileWriter.
Definition at line 252 of file mitkPlanarFigureWriter.cpp.
References mitk::DataNode::GetData().
Referenced by SetInput().
Pointer mitk::PlanarFigureWriter::Clone | ( | ) | const |
|
protected |
creates a TinyXML element that contains x, y, and z values
Documentation
[in] | name | the name of the XML element |
[in] | v | the vector or point that contains the x, y and z values |
Definition at line 208 of file mitkPlanarFigureWriter.cpp.
Referenced by GenerateData().
|
inlineoverridevirtual |
Implements mitk::FileWriterWithInformation.
Definition at line 142 of file mitkPlanarFigureWriter.h.
References Update().
|
overrideprotected |
Writes the a .pf file in xml format that contains all input planar figures
Definition at line 37 of file mitkPlanarFigureWriter.cpp.
References CreateXMLVectorElement(), mitk::BaseGeometry::GetIndexToWorldTransform(), GetInput(), m_FileName, mitk::FileWriter::m_MemoryBuffer, mitk::FileWriter::m_MemoryBufferSize, m_Success, mitk::FileWriter::m_WriteToMemory, and MITK_ERROR.
|
inlineoverridevirtual |
Implements mitk::FileWriterWithInformation.
Definition at line 137 of file mitkPlanarFigureWriter.h.
|
inlineoverridevirtual |
Implements mitk::FileWriterWithInformation.
Definition at line 135 of file mitkPlanarFigureWriter.h.
|
inlineoverridevirtual |
Implements mitk::FileWriterWithInformation.
Definition at line 136 of file mitkPlanarFigureWriter.h.
|
overridevirtual |
Return the extension to be added to the filename.
Reimplemented from mitk::FileWriter.
Definition at line 291 of file mitkPlanarFigureWriter.cpp.
References m_Extension.
|
virtual |
Implements mitk::FileWriter.
|
virtual |
Implements mitk::FileWriter.
|
virtual |
Implements mitk::FileWriter.
mitk::PlanarFigure * mitk::PlanarFigureWriter::GetInput | ( | void | ) |
Definition at line 239 of file mitkPlanarFigureWriter.cpp.
Referenced by GenerateData().
mitk::PlanarFigure * mitk::PlanarFigureWriter::GetInput | ( | const unsigned int & | num | ) |
num | the index of the desired output object. |
Definition at line 247 of file mitkPlanarFigureWriter.cpp.
|
overridevirtual |
Return the possible file extensions for the data type associated with the writer.
Implements mitk::FileWriter.
Definition at line 284 of file mitkPlanarFigureWriter.cpp.
References m_Extension.
|
virtual |
|
overridevirtual |
Implements mitk::FileWriter.
Definition at line 274 of file mitkPlanarFigureWriter.cpp.
References mitk::BaseData::GetStaticNameOfClass().
|
overridevirtual |
Return the MimeType of the saved File.
Reimplemented from mitk::FileWriter.
Definition at line 279 of file mitkPlanarFigureWriter.cpp.
References m_MimeType.
mitk::PlanarFigureWriter::mitkClassMacro | ( | PlanarFigureWriter | , |
mitk::FileWriter | |||
) |
|
static |
|
overridevirtual |
CAUTION: It's up to the user to call this function to release the memory buffer after use in case the file writer has written to its memory array. See mitkFileWriter base class.
Reimplemented from mitk::FileWriter.
Definition at line 200 of file mitkPlanarFigureWriter.cpp.
References mitk::FileWriter::m_MemoryBuffer.
|
protectedvirtual |
Resizes the number of inputs of the writer. The inputs are initialized by empty PlanarFigures
num | the new number of inputs |
Definition at line 217 of file mitkPlanarFigureWriter.cpp.
Referenced by SetInput().
|
virtual |
Sets the filename of the file to write.
FileName | the name of the file to write. |
Implements mitk::FileWriter.
|
virtual |
Implements mitk::FileWriter.
|
virtual |
Implements mitk::FileWriter.
void mitk::PlanarFigureWriter::SetInput | ( | InputType * | input | ) |
Sets the 0'th input object for the filter.
input | the first input for the filter. |
Definition at line 227 of file mitkPlanarFigureWriter.cpp.
void mitk::PlanarFigureWriter::SetInput | ( | const unsigned int & | num, |
InputType * | input | ||
) |
Sets the n'th input object for the filter. If num is larger than GetNumberOfInputs() the number of inputs is resized appropriately.
input | the n'th input for the filter. |
Definition at line 232 of file mitkPlanarFigureWriter.cpp.
References ResizeInputs().
|
virtual |
Set the DataTreenode as Input. Important: The Writer always have a SetInput-Function.
Definition at line 268 of file mitkPlanarFigureWriter.cpp.
References CanWriteDataType(), and mitk::DataNode::GetData().
|
protected |
Definition at line 192 of file mitkPlanarFigureWriter.h.
Referenced by GetFileExtension(), and GetPossibleFileExtensions().
|
protected |
Definition at line 189 of file mitkPlanarFigureWriter.h.
Referenced by GenerateData().
|
protected |
Definition at line 191 of file mitkPlanarFigureWriter.h.
|
protected |
Definition at line 190 of file mitkPlanarFigureWriter.h.
|
protected |
Definition at line 193 of file mitkPlanarFigureWriter.h.
Referenced by GetWritenMIMEType().
|
protected |
Definition at line 194 of file mitkPlanarFigureWriter.h.
Referenced by GenerateData().
mitk::PlanarFigureWriter::mitkWriterMacro |
Definition at line 35 of file mitkPlanarFigureWriter.h.