Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkVTKPolyDataReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVTKPolyDataReader.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/07/26 06:30:29 $
00007   Version:   $Revision: 1.5 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkVTKPolyDataReader_h
00018 #define __itkVTKPolyDataReader_h
00019 
00020 #include "itkMesh.h"
00021 #include "itkMeshSource.h"
00022 #include "itkTriangleCell.h"
00023 #include "itkMapContainer.h"
00024 
00025 namespace itk
00026 {
00027 
00035 template <class TOutputMesh>
00036 class VTKPolyDataReader : public MeshSource<TOutputMesh>
00037 {
00038 public:
00040   typedef VTKPolyDataReader         Self;
00041   typedef MeshSource<TOutputMesh>   Superclass;
00042   typedef SmartPointer<Self>        Pointer;
00043   typedef SmartPointer<const Self>  ConstPointer;
00044 
00046   itkNewMacro(Self);
00047 
00049   itkTypeMacro(VTKPolyDataReader, MeshSource);
00050 
00052   typedef TOutputMesh                          OutputMeshType;
00053   typedef typename OutputMeshType::MeshTraits  MeshTraits;
00054   typedef typename OutputMeshType::PointType   PointType;
00055   typedef typename MeshTraits::PixelType       PixelType;
00056 
00058   typedef typename OutputMeshType::Pointer     OutputMeshPointer;
00059   typedef typename OutputMeshType::CellTraits  CellTraits;
00060   typedef typename CellTraits::CellIdentifier  CellIdentifier;
00061   typedef typename CellTraits::PointIdentifier PointIdentifier;
00062   typedef typename CellTraits::PointIdIterator PointIdIterator;
00063   typedef typename OutputMeshType::PointsContainerPointer
00064     PointsContainerPointer;
00065 
00066   typedef typename OutputMeshType::PointsContainer
00067     PointsContainer;
00068 
00070   typedef CellInterface<PixelType, CellTraits> CellInterfaceType;
00071   typedef TriangleCell<CellInterfaceType>      TriangleCellType;
00072 
00073   typedef typename TriangleCellType::SelfAutoPointer
00074     TriangleCellAutoPointer;
00075   typedef typename TriangleCellType::CellAutoPointer
00076     CellAutoPointer;
00077 
00078   typedef std::pair<unsigned long,unsigned long>     IndexPairType;
00079   typedef MapContainer<IndexPairType, unsigned long> PointMapType;
00080   typedef typename PointType::VectorType             VectorType;
00081 
00087   itkSetStringMacro(FileName);
00088   itkGetStringMacro(FileName);
00090 
00091 protected:
00092   VTKPolyDataReader();
00093   ~VTKPolyDataReader() {}
00094   void PrintSelf(std::ostream& os, Indent indent) const;
00095 
00097   void GenerateData();
00098 
00100   std::string m_FileName;
00101 
00102 private:
00103   VTKPolyDataReader(const Self&); // purposely not implemented
00104   void operator=(const Self&); // purposely not implemented
00105 };
00106 
00107 } // end namespace itk
00108 
00109 #ifndef ITK_MANUAL_INSTANTIATION
00110 #include "itkVTKPolyDataReader.txx"
00111 #endif
00112 
00113 #endif //_itkVTKPolyDataReader_h
00114 

Generated at Sun Sep 23 14:42:57 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000