Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __itkMeshFileReaderBase_h
00016 #define __itkMeshFileReaderBase_h
00017
00018 #include "itkMeshSource.h"
00019 #include "itkExceptionObject.h"
00020
00021 namespace itk
00022 {
00023
00025 class MeshFileReaderException : public ExceptionObject
00026 {
00027 public:
00029 itkTypeMacro( MeshFileReaderException, ExceptionObject );
00030
00032 MeshFileReaderException(const char *file, unsigned int line,
00033 const char* message = "Error in IO",
00034 const char* loc = "Unknown") :
00035 ExceptionObject(file, line, message, loc)
00036 {
00037 }
00038
00040 MeshFileReaderException(const std::string &file, unsigned int line,
00041 const char* message = "Error in IO",
00042 const char* loc = "Unknown") :
00043 ExceptionObject(file, line, message, loc)
00044 {
00045 }
00046 };
00047
00048
00057 template <class TOutputMesh>
00058 class MeshFileReaderBase : public MeshSource<TOutputMesh>
00059 {
00060 public:
00062 typedef MeshFileReaderBase Self;
00063 typedef MeshSource<TOutputMesh> Superclass;
00064 typedef SmartPointer<Self> Pointer;
00065 typedef SmartPointer<const Self> ConstPointer;
00066
00068 itkNewMacro(Self);
00069
00071 itkTypeMacro(MeshFileReaderBase, MeshSource);
00072
00074 typedef typename Superclass::DataObjectPointer DatabObjectPointer;
00075 typedef typename Superclass::OutputMeshType OutputMeshType;
00076 typedef typename Superclass::OutputMeshPointer OutputMeshPointer;
00077
00079 itkGetStringMacro(FileName);
00080 itkSetStringMacro(FileName);
00081
00084 virtual void GenerateOutputInformation(void);
00085
00090 virtual void EnlargeOutputRequestedRegion(DataObject *output);
00091
00092 protected:
00093 MeshFileReaderBase();
00094 virtual ~MeshFileReaderBase(){};
00095
00101 virtual void TestFileExistanceAndReadability();
00102
00103 std::string m_FileName;
00104
00105 private:
00106 MeshFileReaderBase(const Self&);
00107 void operator=(const Self&);
00108
00109
00110 };
00111
00112 }
00113
00114
00115 #ifndef ITK_MANUAL_INSTANTIATION
00116 #include "itkMeshFileReaderBase.txx"
00117 #endif
00118
00119
00120 #endif