Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::PlanarFigureWriter Class Reference

XML-based writer for mitk::PlanarFigures. More...

#include <mitkPlanarFigureWriter.h>

Inheritance diagram for mitk::PlanarFigureWriter:
Collaboration diagram for mitk::PlanarFigureWriter:

Public Types

typedef mitk::PlanarFigure InputType
 
typedef InputType::Pointer InputTypePointer
 
- Public Types inherited from mitk::FileWriterWithInformation
typedef FileWriterWithInformation Self
 
typedef FileWriter Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::FileWriter
typedef FileWriter Self
 
typedef itk::ProcessObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

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)
 
PlanarFigureGetInput ()
 
PlanarFigureGetInput (const unsigned int &num)
 
virtual std::vector< std::string > GetPossibleFileExtensions () override
 Return the possible file extensions for the data type associated with the writer. More...
 
virtual std::string GetFileExtension () override
 Return the extension to be added to the filename. More...
 
virtual bool CanWriteDataType (DataNode *) override
 Check if the Writer can write the Content of the. More...
 
virtual 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...
 
virtual std::string GetSupportedBaseData () const override
 
virtual bool GetSuccess () const
 
virtual const char * GetDefaultFilename () override
 
virtual const char * GetFileDialogPattern () override
 
virtual const char * GetDefaultExtension () override
 
virtual bool CanWriteBaseDataType (BaseData::Pointer data) override
 
virtual void DoWrite (BaseData::Pointer data) override
 
virtual 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...
 
- Public Member Functions inherited from mitk::FileWriterWithInformation
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
- Public Member Functions inherited from mitk::FileWriter
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 Public Member Functions inherited from mitk::FileWriterWithInformation
static const char * GetStaticNameOfClass ()
 
- Static Public Member Functions inherited from mitk::FileWriter
static const char * GetStaticNameOfClass ()
 

Public Attributes

 mitkWriterMacro
 

Protected Member Functions

 PlanarFigureWriter ()
 
virtual ~PlanarFigureWriter ()
 
virtual 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...
 
- Protected Member Functions inherited from mitk::FileWriter
 FileWriter ()
 
virtual ~FileWriter ()
 

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
 
- Protected Attributes inherited from mitk::FileWriter
bool m_CanWriteToMemory
 
bool m_WriteToMemory
 
char * m_MemoryBuffer
 
unsigned int m_MemoryBufferSize
 

Detailed Description

XML-based writer for mitk::PlanarFigures.

XML-based writer for mitk::PlanarFigures.

Definition at line 34 of file mitkPlanarFigureWriter.h.

Member Typedef Documentation

Constructor & Destructor Documentation

mitk::PlanarFigureWriter::PlanarFigureWriter ( )
protected

Constructor.

Definition at line 22 of file mitkPlanarFigureWriter.cpp.

References mitk::FileWriter::m_CanWriteToMemory.

mitk::PlanarFigureWriter::~PlanarFigureWriter ( )
protectedvirtual

Virtual destructor.

Definition at line 37 of file mitkPlanarFigureWriter.cpp.

Member Function Documentation

virtual bool mitk::PlanarFigureWriter::CanWriteBaseDataType ( BaseData::Pointer  data)
inlineoverridevirtual

Implements mitk::FileWriterWithInformation.

Definition at line 140 of file mitkPlanarFigureWriter.h.

bool mitk::PlanarFigureWriter::CanWriteDataType ( DataNode input)
overridevirtual

Check if the Writer can write the Content of the.

Reimplemented from mitk::FileWriter.

Definition at line 256 of file mitkPlanarFigureWriter.cpp.

References mitk::DataNode::GetData().

Pointer mitk::PlanarFigureWriter::Clone ( ) const
TiXmlElement * mitk::PlanarFigureWriter::CreateXMLVectorElement ( const char *  name,
itk::FixedArray< mitk::ScalarType, 3 >  v 
)
protected

creates a TinyXML element that contains x, y, and z values

Documentation

Parameters
[in]namethe name of the XML element
[in]vthe vector or point that contains the x, y and z values
Returns
returns a TiXmlElement named name and three attributes x, y and z.

Definition at line 212 of file mitkPlanarFigureWriter.cpp.

virtual void mitk::PlanarFigureWriter::DoWrite ( BaseData::Pointer  data)
inlineoverridevirtual

Implements mitk::FileWriterWithInformation.

Definition at line 144 of file mitkPlanarFigureWriter.h.

References Update().

void mitk::PlanarFigureWriter::GenerateData ( )
overrideprotectedvirtual
virtual const char* mitk::PlanarFigureWriter::GetDefaultExtension ( )
inlineoverridevirtual

Implements mitk::FileWriterWithInformation.

Definition at line 139 of file mitkPlanarFigureWriter.h.

virtual const char* mitk::PlanarFigureWriter::GetDefaultFilename ( )
inlineoverridevirtual

Implements mitk::FileWriterWithInformation.

Definition at line 137 of file mitkPlanarFigureWriter.h.

virtual const char* mitk::PlanarFigureWriter::GetFileDialogPattern ( )
inlineoverridevirtual

Implements mitk::FileWriterWithInformation.

Definition at line 138 of file mitkPlanarFigureWriter.h.

std::string mitk::PlanarFigureWriter::GetFileExtension ( )
overridevirtual

Return the extension to be added to the filename.

Reimplemented from mitk::FileWriter.

Definition at line 295 of file mitkPlanarFigureWriter.cpp.

virtual const char* mitk::PlanarFigureWriter::GetFileName ( ) const
virtual
Returns
the name of the file to be written to disk.

Implements mitk::FileWriter.

virtual const char* mitk::PlanarFigureWriter::GetFilePattern ( ) const
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

virtual const char* mitk::PlanarFigureWriter::GetFilePrefix ( ) const
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

mitk::PlanarFigure * mitk::PlanarFigureWriter::GetInput ( void  )
Returns
the 0'th input object of the filter.

Definition at line 243 of file mitkPlanarFigureWriter.cpp.

mitk::PlanarFigure * mitk::PlanarFigureWriter::GetInput ( const unsigned int &  num)
Parameters
numthe index of the desired output object.
Returns
the n'th input object of the filter.

Definition at line 251 of file mitkPlanarFigureWriter.cpp.

std::vector< std::string > mitk::PlanarFigureWriter::GetPossibleFileExtensions ( )
overridevirtual

Return the possible file extensions for the data type associated with the writer.

Implements mitk::FileWriter.

Definition at line 288 of file mitkPlanarFigureWriter.cpp.

virtual bool mitk::PlanarFigureWriter::GetSuccess ( ) const
virtual
Returns
whether the last write attempt was successful or not.
std::string mitk::PlanarFigureWriter::GetSupportedBaseData ( ) const
overridevirtual

Implements mitk::FileWriter.

Definition at line 278 of file mitkPlanarFigureWriter.cpp.

References mitk::BaseData::GetStaticNameOfClass().

std::string mitk::PlanarFigureWriter::GetWritenMIMEType ( )
overridevirtual

Return the MimeType of the saved File.

Reimplemented from mitk::FileWriter.

Definition at line 283 of file mitkPlanarFigureWriter.cpp.

mitk::PlanarFigureWriter::mitkClassMacro ( PlanarFigureWriter  ,
mitk::FileWriter   
)
static Pointer mitk::PlanarFigureWriter::New ( )
static
void mitk::PlanarFigureWriter::ReleaseMemory ( )
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 204 of file mitkPlanarFigureWriter.cpp.

void mitk::PlanarFigureWriter::ResizeInputs ( const unsigned int &  num)
protectedvirtual

Resizes the number of inputs of the writer. The inputs are initialized by empty PlanarFigures

Parameters
numthe new number of inputs

Definition at line 221 of file mitkPlanarFigureWriter.cpp.

virtual void mitk::PlanarFigureWriter::SetFileName ( const char *  _arg)
virtual

Sets the filename of the file to write.

Parameters
FileNamethe name of the file to write.

Implements mitk::FileWriter.

virtual void mitk::PlanarFigureWriter::SetFilePattern ( const char *  _arg)
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

virtual void mitk::PlanarFigureWriter::SetFilePrefix ( const char *  _arg)
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

void mitk::PlanarFigureWriter::SetInput ( InputType input)

Sets the 0'th input object for the filter.

Parameters
inputthe first input for the filter.

Definition at line 231 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.

Parameters
inputthe n'th input for the filter.

Definition at line 236 of file mitkPlanarFigureWriter.cpp.

void mitk::PlanarFigureWriter::SetInput ( DataNode input)
virtual

Set the DataTreenode as Input. Important: The Writer always have a SetInput-Function.

Definition at line 272 of file mitkPlanarFigureWriter.cpp.

References mitk::DataNode::GetData().

Member Data Documentation

std::string mitk::PlanarFigureWriter::m_Extension
protected

Definition at line 194 of file mitkPlanarFigureWriter.h.

std::string mitk::PlanarFigureWriter::m_FileName
protected

Definition at line 191 of file mitkPlanarFigureWriter.h.

std::string mitk::PlanarFigureWriter::m_FilePattern
protected

Definition at line 193 of file mitkPlanarFigureWriter.h.

std::string mitk::PlanarFigureWriter::m_FilePrefix
protected

Definition at line 192 of file mitkPlanarFigureWriter.h.

std::string mitk::PlanarFigureWriter::m_MimeType
protected

Definition at line 195 of file mitkPlanarFigureWriter.h.

bool mitk::PlanarFigureWriter::m_Success
protected

Definition at line 196 of file mitkPlanarFigureWriter.h.

mitk::PlanarFigureWriter::mitkWriterMacro

Definition at line 39 of file mitkPlanarFigureWriter.h.


The documentation for this class was generated from the following files: