go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMeshFileReaderBase.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkMeshFileReaderBase_h
16 #define __itkMeshFileReaderBase_h
17 
18 #include "itkMeshSource.h"
19 #include "itkExceptionObject.h"
20 
21 namespace itk
22 {
23 
25  class MeshFileReaderException : public ExceptionObject
26  {
27  public:
29  itkTypeMacro( MeshFileReaderException, ExceptionObject );
30 
32  MeshFileReaderException(const char *file, unsigned int line,
33  const char* message = "Error in IO",
34  const char* loc = "Unknown") :
35  ExceptionObject(file, line, message, loc)
36  {
37  }
38 
40  MeshFileReaderException(const std::string &file, unsigned int line,
41  const char* message = "Error in IO",
42  const char* loc = "Unknown") :
43  ExceptionObject(file, line, message, loc)
44  {
45  }
46  };
47 
48 
57  template <class TOutputMesh>
58  class MeshFileReaderBase : public MeshSource<TOutputMesh>
59  {
60  public:
63  typedef MeshSource<TOutputMesh> Superclass;
64  typedef SmartPointer<Self> Pointer;
65  typedef SmartPointer<const Self> ConstPointer;
66 
68  itkNewMacro(Self);
69 
71  itkTypeMacro(MeshFileReaderBase, MeshSource);
72 
74  typedef typename Superclass::DataObjectPointer DatabObjectPointer;
75  typedef typename Superclass::OutputMeshType OutputMeshType;
76  typedef typename Superclass::OutputMeshPointer OutputMeshPointer;
77 
79  itkGetStringMacro(FileName);
80  itkSetStringMacro(FileName);
81 
84  virtual void GenerateOutputInformation(void);
85 
90  virtual void EnlargeOutputRequestedRegion(DataObject *output);
91 
92  protected:
94  virtual ~MeshFileReaderBase(){};
95 
101  virtual void TestFileExistanceAndReadability();
102 
103  std::string m_FileName;
104 
105  private:
106  MeshFileReaderBase(const Self&); //purposely not implemented
107  void operator=(const Self&); //purposely not implemented
108 
109 
110  }; // end class
111 
112 } // end namespace itk
113 
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkMeshFileReaderBase.txx"
117 #endif
118 
119 
120 #endif
MeshFileReaderException(const char *file, unsigned int line, const char *message="Error in IO", const char *loc="Unknown")
SmartPointer< Self > Pointer
Superclass::DataObjectPointer DatabObjectPointer
virtual void TestFileExistanceAndReadability()
MeshSource< TOutputMesh > Superclass
virtual void EnlargeOutputRequestedRegion(DataObject *output)
SmartPointer< const Self > ConstPointer
Superclass::OutputMeshPointer OutputMeshPointer
MeshFileReaderException(const std::string &file, unsigned int line, const char *message="Error in IO", const char *loc="Unknown")
void operator=(const Self &)
Superclass::OutputMeshType OutputMeshType
Base class for mesh readers.
virtual void GenerateOutputInformation(void)
Base exception class for IO conflicts.


Generated on 05-12-2013 for elastix by doxygen 1.8.5 elastix logo