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

itkVTKPolyDataWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVTKPolyDataWriter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-10 22:22:06 $
00007   Version:   $Revision: 1.4 $
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 __itkVTKPolyDataWriter_h
00018 #define __itkVTKPolyDataWriter_h
00019 
00020 #include "itkMesh.h"
00021 #include "itkTriangleCell.h"
00022 
00023 namespace itk
00024 {
00032 template <class TInputMesh>
00033 class VTKPolyDataWriter : public Object
00034 {
00035 public:
00037   typedef VTKPolyDataWriter         Self;
00038   typedef Object                    Superclass;
00039   typedef SmartPointer<Self>        Pointer;
00040   typedef SmartPointer<const Self>  ConstPointer;
00041 
00043   itkNewMacro(Self);
00044 
00046   itkTypeMacro(VTKPolyDataWriter, Object);
00047 
00050   void Update(void);
00051   void Write(void);
00053 
00056   typedef TInputMesh                          InputMeshType;
00057   typedef typename InputMeshType::PixelType   PixelType;
00058   typedef typename InputMeshType::PointType   PointType;
00059   typedef typename InputMeshType::CellType    CellType;
00060 
00062   typedef typename InputMeshType::ConstPointer  InputMeshPointer;
00063   typedef typename InputMeshType::CellTraits    CellTraits;
00064 
00066   typedef CellInterface<PixelType, CellTraits> CellInterfaceType;
00067   typedef TriangleCell<CellInterfaceType>      TriangleCellType;
00068 
00069   typedef typename InputMeshType::PointsContainer    PointsContainer;
00070   typedef typename InputMeshType::CellsContainer     CellsContainer;
00071 
00072   typedef typename PointsContainer::ConstIterator    PointIterator;
00073   typedef typename CellsContainer::ConstIterator     CellIterator;
00074 
00075   typedef typename CellType::PointIdIterator         PointIdIterator;
00076 
00078   void SetInput(const InputMeshType * input);
00079 
00081   itkSetStringMacro(FileName);
00082   itkGetStringMacro(FileName);
00084 
00085 protected:
00086   VTKPolyDataWriter();
00087   virtual ~VTKPolyDataWriter();
00088 
00089   virtual void GenerateData();
00090 
00091   std::string         m_FileName;
00092   InputMeshPointer    m_Input;
00093 
00094   void PrintSelf(std::ostream& os, Indent indent) const;
00095 
00096 private:
00097   VTKPolyDataWriter(const Self&); //purposely not implemented
00098   void operator=(const Self&); //purposely not implemented
00099 };
00100 
00101 } // namespace itk
00102 
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATION
00105 #include "itkVTKPolyDataWriter.txx"
00106 #endif
00107 
00108 #endif
00109 

Generated at Thu Nov 6 00:59:16 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000