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.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
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&); //purposely not implemented
00107     void operator=(const Self&); //purposely not implemented
00108 
00109 
00110   }; // end class
00111 
00112 } // end namespace itk
00113 
00114 
00115 #ifndef ITK_MANUAL_INSTANTIATION
00116 #include "itkMeshFileReaderBase.txx"
00117 #endif
00118 
00119 
00120 #endif


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo