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: 2009-01-08 00:20:04 $
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 __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   typedef typename InputMeshType::PointIdentifier PointIdentifier;
00061 
00063   typedef typename InputMeshType::ConstPointer  InputMeshPointer;
00064   typedef typename InputMeshType::CellTraits    CellTraits;
00065 
00067   typedef CellInterface<PixelType, CellTraits> CellInterfaceType;
00068   typedef TriangleCell<CellInterfaceType>      TriangleCellType;
00069 
00070   typedef typename InputMeshType::PointsContainer    PointsContainer;
00071   typedef typename InputMeshType::CellsContainer     CellsContainer;
00072 
00073   typedef typename PointsContainer::ConstIterator    PointIterator;
00074   typedef typename CellsContainer::ConstIterator     CellIterator;
00075 
00076   typedef typename CellType::PointIdIterator         PointIdIterator;
00077 
00079   void SetInput(const InputMeshType * input);
00080 
00082   itkSetStringMacro(FileName);
00083   itkGetStringMacro(FileName);
00085 
00086 protected:
00087   VTKPolyDataWriter();
00088   virtual ~VTKPolyDataWriter();
00089 
00090   virtual void GenerateData();
00091 
00092   std::string         m_FileName;
00093   InputMeshPointer    m_Input;
00094 
00095   void PrintSelf(std::ostream& os, Indent indent) const;
00096 
00097 private:
00098   VTKPolyDataWriter(const Self&); //purposely not implemented
00099   void operator=(const Self&); //purposely not implemented
00100 };
00101 
00102 } // namespace itk
00103 
00104 
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "itkVTKPolyDataWriter.txx"
00107 #endif
00108 
00109 #endif
00110 

Generated at Tue Sep 15 05:27:36 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000