Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _MITK_PlanarFigureReader__H_
00020 #define _MITK_PlanarFigureReader__H_
00021
00022 #include "mitkPlanarFigureSource.h"
00023 #include "PlanarFigureExports.h"
00024 #include "mitkFileReader.h"
00025
00026 #include <list>
00027
00028
00029 class TiXmlElement;
00030 namespace mitk
00031 {
00040 class PlanarFigure_EXPORT PlanarFigureReader: public PlanarFigureSource, public FileReader
00041 {
00042 public:
00043
00044 mitkClassMacro( PlanarFigureReader, FileReader );
00045
00046 itkNewMacro( Self );
00047
00052 itkSetStringMacro( FileName );
00053
00058 itkGetStringMacro( FileName );
00059
00063 itkSetStringMacro( FilePrefix );
00064
00068 itkGetStringMacro( FilePrefix );
00069
00073 itkSetStringMacro( FilePattern );
00074
00078 itkGetStringMacro( FilePattern );
00079
00080 static bool CanReadFile(const std::string filename, const std::string filePrefix, const std::string filePattern);
00081
00085 itkGetConstMacro(Success, bool);
00086
00093 virtual DataObjectPointer MakeOutput ( unsigned int idx );
00094
00095 protected:
00096
00097 typedef std::list< double > DoubleList;
00098
00102 PlanarFigureReader();
00103
00107 virtual ~PlanarFigureReader();
00108
00112 virtual void GenerateData();
00113
00117 virtual void GenerateOutputInformation();
00118
00123 virtual void ResizeOutputs( const unsigned int& num );
00124
00131 virtual int CanReadFile (const char *name);
00132
00138 mitk::Vector3D GetVectorFromXMLNode(TiXmlElement* e);
00139
00145 mitk::Point3D GetPointFromXMLNode(TiXmlElement* e);
00146
00155 DoubleList GetDoubleAttributeListFromXMLNode(TiXmlElement* e, const char *attributeNameBase, unsigned int count);
00156
00157
00158 std::string m_FileName;
00159 std::string m_FilePrefix;
00160 std::string m_FilePattern;
00161 bool m_Success;
00162 };
00163 }
00164 #endif