Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::SurfaceVtkWriter< VTKWRITER > Class Template Reference

VTK-based writer for mitk::Surface. More...

#include <mitkSurfaceVtkWriter.h>

Inheritance diagram for mitk::SurfaceVtkWriter< VTKWRITER >:
Collaboration diagram for mitk::SurfaceVtkWriter< VTKWRITER >:

Public Types

typedef VTKWRITER VtkWriterType
 
- 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 (SurfaceVtkWriter, mitk::FileWriter)
 
Pointer Clone () const
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
virtual void SetExtension (const char *_arg)
 Explicitly set the extension to be added to the filename. More...
 
virtual const char * GetExtension () const
 Get the extension to be added to the filename. More...
 
void SetDefaultExtension ()
 Set the extension to be added to the filename to the default. More...
 
virtual void SetFilePrefix (const char *_arg)
 
virtual const char * GetFilePrefix () const
 
virtual void SetFilePattern (const char *_arg)
 
virtual const char * GetFilePattern () const
 
void SetInput (mitk::Surface *input)
 
const mitk::SurfaceGetInput ()
 
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 DataTreenode. 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...
 
VtkWriterTypeGetVtkWriter ()
 
virtual std::vector< std::string > GetPossibleFileExtensions () override
 Return the possible file extensions for the data type associated with the writer. More...
 
virtual std::string GetSupportedBaseData () const override
 
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
 
template<>
void SetDefaultExtension ()
 
template<>
void SetDefaultExtension ()
 
template<>
void SetDefaultExtension ()
 
template<>
const char * GetDefaultFilename ()
 
template<>
const char * GetFileDialogPattern ()
 
template<>
const char * GetDefaultExtension ()
 
template<>
bool CanWriteBaseDataType (BaseData::Pointer data)
 
template<>
void DoWrite (BaseData::Pointer data)
 
template<>
const char * GetDefaultFilename ()
 
template<>
const char * GetFileDialogPattern ()
 
template<>
const char * GetDefaultExtension ()
 
template<>
bool CanWriteBaseDataType (BaseData::Pointer data)
 
template<>
void DoWrite (BaseData::Pointer data)
 
template<>
const char * GetDefaultFilename ()
 
template<>
const char * GetFileDialogPattern ()
 
template<>
const char * GetDefaultExtension ()
 
template<>
bool CanWriteBaseDataType (BaseData::Pointer data)
 
template<>
void DoWrite (BaseData::Pointer data)
 
template<>
std::vector< std::string > GetPossibleFileExtensions ()
 Return the possible file extensions for the data type associated with the writer. More...
 
template<>
std::vector< std::string > GetPossibleFileExtensions ()
 Return the possible file extensions for the data type associated with the writer. More...
 
template<>
std::vector< std::string > GetPossibleFileExtensions ()
 Return the possible file extensions for the data type associated with the writer. 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...
 
virtual void ReleaseMemory ()
 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. 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

 SurfaceVtkWriter ()
 
virtual ~SurfaceVtkWriter ()
 
virtual void GenerateData () override
 
void ExecuteWrite (VtkWriterType *vtkWriter)
 
template<>
void ExecuteWrite (VtkWriterType *vtkWriter)
 
- 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
 
vtkSmartPointer< VtkWriterTypem_VtkWriter
 
bool m_WriterWriteHasReturnValue
 
- Protected Attributes inherited from mitk::FileWriter
bool m_CanWriteToMemory
 
bool m_WriteToMemory
 
char * m_MemoryBuffer
 
unsigned int m_MemoryBufferSize
 

Detailed Description

template<class VTKWRITER>
class mitk::SurfaceVtkWriter< VTKWRITER >

VTK-based writer for mitk::Surface.

The mitk::Surface is written using the VTK-writer-type provided as the template argument. If the mitk::Surface contains multiple points of time, multiple files are written. The life-span (time-bounds) of each each point of time is included in the filename according to the following scheme: <filename>_S<timebounds[0]>E<timebounds[1]>_T<framenumber> (S=start, E=end, T=time). Writing of multiple files according to a given filename pattern is not yet supported.

Deprecated:
(as of 2014_10) Use mitk::IOUtils or mitk::FileReaderRegistry instead.

Definition at line 55 of file mitkSurfaceVtkWriter.h.

Member Typedef Documentation

template<class VTKWRITER >
typedef VTKWRITER mitk::SurfaceVtkWriter< VTKWRITER >::VtkWriterType

Definition at line 64 of file mitkSurfaceVtkWriter.h.

Constructor & Destructor Documentation

template<class VTKWRITER >
mitk::SurfaceVtkWriter< VTKWRITER >::SurfaceVtkWriter ( )
protected

Constructor.

template<class VTKWRITER >
virtual mitk::SurfaceVtkWriter< VTKWRITER >::~SurfaceVtkWriter ( )
protectedvirtual

Virtual destructor.

Member Function Documentation

template<>
bool mitk::SurfaceVtkWriter< vtkSTLWriter >::CanWriteBaseDataType ( BaseData::Pointer  data)
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 64 of file mitkSurfaceVtkWriter.cpp.

template<>
bool mitk::SurfaceVtkWriter< vtkPolyDataWriter >::CanWriteBaseDataType ( BaseData::Pointer  data)
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 98 of file mitkSurfaceVtkWriter.cpp.

template<>
bool mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::CanWriteBaseDataType ( BaseData::Pointer  data)
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 132 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
virtual bool mitk::SurfaceVtkWriter< VTKWRITER >::CanWriteBaseDataType ( BaseData::Pointer  data)
overridevirtual
template<class VTKWRITER >
virtual bool mitk::SurfaceVtkWriter< VTKWRITER >::CanWriteDataType ( DataNode )
overridevirtual

Check if the Writer can write the Content of the DataTreenode.

Reimplemented from mitk::FileWriter.

template<class VTKWRITER >
Pointer mitk::SurfaceVtkWriter< VTKWRITER >::Clone ( ) const
template<>
void mitk::SurfaceVtkWriter< vtkSTLWriter >::DoWrite ( BaseData::Pointer  data)
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 70 of file mitkSurfaceVtkWriter.cpp.

References Update().

template<>
void mitk::SurfaceVtkWriter< vtkPolyDataWriter >::DoWrite ( BaseData::Pointer  data)
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 104 of file mitkSurfaceVtkWriter.cpp.

References Update().

template<>
void mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::DoWrite ( BaseData::Pointer  data)
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 138 of file mitkSurfaceVtkWriter.cpp.

References Update().

template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::DoWrite ( BaseData::Pointer  data)
overridevirtual
template<>
void mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::ExecuteWrite ( VtkWriterType vtkWriter)
protected

Definition at line 148 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
void mitk::SurfaceVtkWriter< VTKWRITER >::ExecuteWrite ( VtkWriterType vtkWriter)
protected
template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::GenerateData ( )
overrideprotectedvirtual
template<>
const char * mitk::SurfaceVtkWriter< vtkSTLWriter >::GetDefaultExtension ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 58 of file mitkSurfaceVtkWriter.cpp.

template<>
const char * mitk::SurfaceVtkWriter< vtkPolyDataWriter >::GetDefaultExtension ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 92 of file mitkSurfaceVtkWriter.cpp.

template<>
const char * mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::GetDefaultExtension ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 126 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetDefaultExtension ( )
overridevirtual
template<>
const char * mitk::SurfaceVtkWriter< vtkSTLWriter >::GetDefaultFilename ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 46 of file mitkSurfaceVtkWriter.cpp.

template<>
const char * mitk::SurfaceVtkWriter< vtkPolyDataWriter >::GetDefaultFilename ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 80 of file mitkSurfaceVtkWriter.cpp.

template<>
const char * mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::GetDefaultFilename ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 114 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetDefaultFilename ( )
overridevirtual
template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetExtension ( ) const
virtual

Get the extension to be added to the filename.

Returns
the extension to be added to the filename (e.g., ".vtk").
template<>
const char * mitk::SurfaceVtkWriter< vtkSTLWriter >::GetFileDialogPattern ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 52 of file mitkSurfaceVtkWriter.cpp.

template<>
const char * mitk::SurfaceVtkWriter< vtkPolyDataWriter >::GetFileDialogPattern ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 86 of file mitkSurfaceVtkWriter.cpp.

template<>
const char * mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::GetFileDialogPattern ( )
virtual

Implements mitk::FileWriterWithInformation.

Definition at line 120 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetFileDialogPattern ( )
overridevirtual
template<class VTKWRITER >
virtual std::string mitk::SurfaceVtkWriter< VTKWRITER >::GetFileExtension ( )
overridevirtual

Return the extension to be added to the filename.

Reimplemented from mitk::FileWriter.

template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetFileName ( ) const
virtual
Returns
the name of the file to be written to disk.

Implements mitk::FileWriter.

template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetFilePattern ( ) const
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

template<class VTKWRITER >
virtual const char* mitk::SurfaceVtkWriter< VTKWRITER >::GetFilePrefix ( ) const
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

template<class VTKWRITER >
const mitk::Surface* mitk::SurfaceVtkWriter< VTKWRITER >::GetInput ( )
Returns
the 0'th input object of the filter.
template<class VTKWRITER >
virtual std::vector<std::string> mitk::SurfaceVtkWriter< VTKWRITER >::GetPossibleFileExtensions ( )
overridevirtual

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

Implements mitk::FileWriter.

template<>
std::vector< std::string > mitk::SurfaceVtkWriter< vtkSTLWriter >::GetPossibleFileExtensions ( )
virtual

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

Implements mitk::FileWriter.

Definition at line 158 of file mitkSurfaceVtkWriter.cpp.

template<>
std::vector< std::string > mitk::SurfaceVtkWriter< vtkPolyDataWriter >::GetPossibleFileExtensions ( )
virtual

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

Implements mitk::FileWriter.

Definition at line 167 of file mitkSurfaceVtkWriter.cpp.

template<>
std::vector< std::string > mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::GetPossibleFileExtensions ( )
virtual

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

Implements mitk::FileWriter.

Definition at line 176 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
virtual std::string mitk::SurfaceVtkWriter< VTKWRITER >::GetSupportedBaseData ( ) const
inlineoverridevirtual

Implements mitk::FileWriter.

Definition at line 160 of file mitkSurfaceVtkWriter.h.

References mitk::Surface::GetStaticNameOfClass().

template<class VTKWRITER >
VtkWriterType* mitk::SurfaceVtkWriter< VTKWRITER >::GetVtkWriter ( )
inline

Definition at line 154 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
virtual std::string mitk::SurfaceVtkWriter< VTKWRITER >::GetWritenMIMEType ( )
overridevirtual

Return the MimeType of the saved File.

Reimplemented from mitk::FileWriter.

template<class VTKWRITER >
mitk::SurfaceVtkWriter< VTKWRITER >::mitkClassMacro ( SurfaceVtkWriter< VTKWRITER >  ,
mitk::FileWriter   
)
template<class VTKWRITER >
static Pointer mitk::SurfaceVtkWriter< VTKWRITER >::New ( )
static
template<>
void mitk::SurfaceVtkWriter< vtkSTLWriter >::SetDefaultExtension ( )

Definition at line 25 of file mitkSurfaceVtkWriter.cpp.

template<>
void mitk::SurfaceVtkWriter< vtkPolyDataWriter >::SetDefaultExtension ( )

Definition at line 32 of file mitkSurfaceVtkWriter.cpp.

template<>
void mitk::SurfaceVtkWriter< vtkXMLPolyDataWriter >::SetDefaultExtension ( )

Definition at line 39 of file mitkSurfaceVtkWriter.cpp.

template<class VTKWRITER >
void mitk::SurfaceVtkWriter< VTKWRITER >::SetDefaultExtension ( )

Set the extension to be added to the filename to the default.

Partial template specialization is used for some vtk-writer types to define the default extension.

template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::SetExtension ( const char *  _arg)
virtual

Explicitly set the extension to be added to the filename.

Parameters
_argto be added to the filename, including a "." (e.g., ".vtk").

Partial template specialization is used for some vtk-writer types to set a default extension.

template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::SetFileName ( const char *  _arg)
virtual

Sets the filename of the file to write.

Parameters
_argthe name of the file to write.

Implements mitk::FileWriter.

template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::SetFilePattern ( const char *  _arg)
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::SetFilePrefix ( const char *  _arg)
virtual
Warning
multiple write not (yet) supported

Implements mitk::FileWriter.

template<class VTKWRITER >
void mitk::SurfaceVtkWriter< VTKWRITER >::SetInput ( mitk::Surface input)

Sets the 0'th input object for the filter.

Parameters
inputthe first input for the filter.
template<class VTKWRITER >
virtual void mitk::SurfaceVtkWriter< VTKWRITER >::SetInput ( DataNode )
virtual

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

Member Data Documentation

template<class VTKWRITER >
std::string mitk::SurfaceVtkWriter< VTKWRITER >::m_Extension
protected

Definition at line 188 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
std::string mitk::SurfaceVtkWriter< VTKWRITER >::m_FileName
protected

Definition at line 182 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
std::string mitk::SurfaceVtkWriter< VTKWRITER >::m_FilePattern
protected

Definition at line 186 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
std::string mitk::SurfaceVtkWriter< VTKWRITER >::m_FilePrefix
protected

Definition at line 184 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
std::string mitk::SurfaceVtkWriter< VTKWRITER >::m_MimeType
protected

Definition at line 190 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
vtkSmartPointer<VtkWriterType> mitk::SurfaceVtkWriter< VTKWRITER >::m_VtkWriter
protected

Definition at line 192 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
bool mitk::SurfaceVtkWriter< VTKWRITER >::m_WriterWriteHasReturnValue
protected

Definition at line 194 of file mitkSurfaceVtkWriter.h.

template<class VTKWRITER >
mitk::SurfaceVtkWriter< VTKWRITER >::mitkWriterMacro

Definition at line 62 of file mitkSurfaceVtkWriter.h.


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