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

reads xml representations of mitk::PointSets from a file More...

#include <mitkPointSetReader.h>

Inheritance diagram for mitk::PointSetReader:
Collaboration diagram for mitk::PointSetReader:

Public Member Functions

 mitkClassMacro (PointSetReader, FileReader)
 
Pointer Clone () const
 
virtual void SetFileName (const char *_arg)
 Sets the filename of the file to be read. More...
 
virtual const char * GetFileName () const
 Returns the filename of the point set xml-file. More...
 
virtual void SetFilePrefix (const char *_arg)
 
virtual const char * GetFilePrefix () const
 
virtual void SetFilePattern (const char *_arg)
 
virtual const char * GetFilePattern () const
 
bool GetSuccess () const
 
- Public Member Functions inherited from mitk::PointSetSource
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
- Public Member Functions inherited from mitk::BaseDataSource
OutputTypeGetOutput ()
 
const OutputTypeGetOutput () const
 
OutputTypeGetOutput (DataObjectPointerArraySizeType idx)
 
const OutputTypeGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void GraftOutput (OutputType *output)
 Graft the specified BaseData onto this BaseDataSource's output. More...
 
virtual void GraftOutput (const DataObjectIdentifierType &key, OutputType *output)
 
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
 Graft the specified base data object onto this BaseDataSource's idx'th output. More...
 
bool Updating () const
 Access itk::ProcessObject::m_Updating. More...
 
- Public Member Functions inherited from mitk::FileReader
virtual std::vector< std::string > GetClassHierarchy () const
 
 itkTypeMacroNoParent (FileReader) virtual const char *GetFileName() const =0
 Get the specified the file to load. More...
 
virtual bool CanReadFromMemory ()
 Specifies, whether the file reader also can read a file from a memory buffer. More...
 
virtual void SetReadFromMemory (bool read)
 Set/Get functions to advise the file reader to use a memory array for reading a file. More...
 
virtual bool GetReadFromMemory ()
 
virtual void SetMemoryBuffer (const char *dataArray, unsigned int size)
 To be used along with a call of SetReadFromMemory(true). This sets the memory buffer and the size from which the reader will read. More...
 

Static Public Member Functions

static Pointer New ()
 
static bool CanReadFile (const std::string filename, const std::string filePrefix, const std::string filePattern)
 
- Static Public Member Functions inherited from mitk::PointSetSource
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
- Static Public Member Functions inherited from mitk::BaseDataSource
static const char * GetStaticNameOfClass ()
 
- Static Public Member Functions inherited from mitk::FileReader
static const char * GetStaticNameOfClass ()
 

Protected Member Functions

 PointSetReader ()
 
virtual ~PointSetReader ()
 
virtual void GenerateData () override
 
virtual mitk::PointSet::Pointer ReadPoint (mitk::PointSet::Pointer newPointSet, TiXmlElement *currentTimeSeries, unsigned int currentTimeStep)
 
virtual void GenerateOutputInformation () override
 
virtual void ResizeOutputs (const unsigned int &num)
 
virtual int CanReadFile (const char *name)
 
- Protected Member Functions inherited from mitk::PointSetSource
 PointSetSource ()
 
virtual ~PointSetSource ()
 
- Protected Member Functions inherited from mitk::BaseDataSource
 BaseDataSource ()
 
virtual ~BaseDataSource ()
 
- Protected Member Functions inherited from mitk::FileReader
 FileReader ()
 
virtual ~FileReader ()
 

Protected Attributes

std::string m_FileName
 
std::string m_FilePrefix
 
std::string m_FilePattern
 
bool m_Success
 
- Protected Attributes inherited from mitk::FileReader
bool m_CanReadFromMemory
 
bool m_ReadFromMemory
 
const char * m_MemoryBuffer
 
unsigned int m_MemorySize
 

Additional Inherited Members

- Public Types inherited from mitk::PointSetSource
typedef PointSetSource Self
 
typedef BaseDataSource Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef PointSet OutputType
 
typedef OutputType::Pointer OutputTypePointer
 
- Public Types inherited from mitk::BaseDataSource
typedef BaseDataSource Self
 
typedef itk::ProcessObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef BaseData OutputType
 
typedef itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
 
- Public Types inherited from mitk::FileReader
typedef FileReader Self
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Static Protected Member Functions inherited from mitk::BaseDataSource
static Pointer New ()
 

Detailed Description

reads xml representations of mitk::PointSets from a file

Reader for xml files containing one or multiple xml represenations of mitk::PointSets. If multiple mitk::PointSets are stored in one file, these are assigned to multiple outputs of the filter. The number of point sets which have be read can be retrieven by a call to GetNumberOfOutputs() after the pipeline update(). The reader is able to read the old 3D Pointsets without the "specification" and "timeseries" tags and the new 4D Pointsets.

Note
loading point sets from multiple files according to a given file pattern is not yet supported!
Deprecated:
(as of 2014_10) Use mitk::IOUtils or mitk::FileReaderRegistry instead.

Definition at line 48 of file mitkPointSetReader.h.

Constructor & Destructor Documentation

mitk::PointSetReader::PointSetReader ( )
protected

Constructor

Definition at line 22 of file mitkPointSetReader.cpp.

References m_Success.

mitk::PointSetReader::~PointSetReader ( )
protectedvirtual

Virtual destructor

Definition at line 27 of file mitkPointSetReader.cpp.

Member Function Documentation

bool mitk::PointSetReader::CanReadFile ( const std::string  filename,
const std::string  filePrefix,
const std::string  filePattern 
)
static

Definition at line 149 of file mitkPointSetReader.cpp.

int mitk::PointSetReader::CanReadFile ( const char *  name)
protectedvirtual

Checks if the given file has appropriate read access.

Returns
true if the file exists and may be read or false otherwise.

Definition at line 141 of file mitkPointSetReader.cpp.

References Json::in().

Pointer mitk::PointSetReader::Clone ( ) const
void mitk::PointSetReader::GenerateData ( )
overrideprotectedvirtual

Actually reads the point sets from the given file

Definition at line 31 of file mitkPointSetReader.cpp.

References MITK_ERROR, MITK_WARN, and mitk::PointSet::New().

void mitk::PointSetReader::GenerateOutputInformation ( void  )
overrideprotectedvirtual

Does nothing in the current implementation

Definition at line 137 of file mitkPointSetReader.cpp.

virtual const char* mitk::PointSetReader::GetFileName ( ) const
virtual

Returns the filename of the point set xml-file.

Returns
the filename of the point set xml-file.
virtual const char* mitk::PointSetReader::GetFilePattern ( ) const
virtual
Warning
multiple load not (yet) supported

Implements mitk::FileReader.

virtual const char* mitk::PointSetReader::GetFilePrefix ( ) const
virtual
Warning
multiple load not (yet) supported

Implements mitk::FileReader.

bool mitk::PointSetReader::GetSuccess ( ) const
Returns
whether the last read attempt was successful or not.

Definition at line 196 of file mitkPointSetReader.cpp.

mitk::PointSetReader::mitkClassMacro ( PointSetReader  ,
FileReader   
)
static Pointer mitk::PointSetReader::New ( )
static
mitk::PointSet::Pointer mitk::PointSetReader::ReadPoint ( mitk::PointSet::Pointer  newPointSet,
TiXmlElement *  currentTimeSeries,
unsigned int  currentTimeStep 
)
protectedvirtual

Definition at line 97 of file mitkPointSetReader.cpp.

References mitk::FillVector3D().

void mitk::PointSetReader::ResizeOutputs ( const unsigned int &  num)
protectedvirtual

Resizes the output-objects according to the given number.

Parameters
numthe new number of output objects.

Definition at line 186 of file mitkPointSetReader.cpp.

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

Sets the filename of the file to be read.

Parameters
_argthe filename of the point set xml-file

Implements mitk::FileReader.

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

Implements mitk::FileReader.

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

Implements mitk::FileReader.

Member Data Documentation

std::string mitk::PointSetReader::m_FileName
protected

Definition at line 133 of file mitkPointSetReader.h.

std::string mitk::PointSetReader::m_FilePattern
protected

Definition at line 137 of file mitkPointSetReader.h.

std::string mitk::PointSetReader::m_FilePrefix
protected

Definition at line 135 of file mitkPointSetReader.h.

bool mitk::PointSetReader::m_Success
protected

Definition at line 139 of file mitkPointSetReader.h.

Referenced by PointSetReader().


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