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

itkSpatialObjectWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSpatialObjectWriter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-03-22 14:28:52 $
00007   Version:   $Revision: 1.13 $
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 __itkSpatialObjectWriter_h
00018 #define __itkSpatialObjectWriter_h
00019 
00020 #include "itkMetaSceneConverter.h"
00021 #include "itkProcessObject.h"
00022 #include "itkSpatialObject.h"
00023 #include "itkSceneSpatialObject.h"
00024 #include <itkDefaultStaticMeshTraits.h>
00025 
00026 namespace itk
00027 {
00028 
00029 template <unsigned int NDimensions = 3, 
00030           typename PixelType = unsigned char,
00031           typename TMeshTraits = DefaultStaticMeshTraits< PixelType ,
00032                                                           NDimensions,
00033                                                           NDimensions >
00034          >
00035 class SpatialObjectWriter : public Object
00036 {
00037 public:
00038 
00040   typedef SpatialObjectWriter Self;
00041   typedef SmartPointer<Self>  Pointer;
00042 
00043   typedef SpatialObject<NDimensions> SpatialObjectType; 
00044   typedef typename SpatialObjectType::Pointer SpatialObjectPointer; 
00045   typedef SceneSpatialObject<NDimensions> SceneType; 
00046 
00048   itkNewMacro(Self);
00049 
00051   typedef Object Superclass;
00052   itkTypeMacro(SpatialObjectWriter, Object);
00054 
00056   void Update(void);
00057 
00059   itkSetStringMacro(FileName);
00060 
00062   itkGetStringMacro(FileName);
00063 
00065   void SetInput(SpatialObjectType * input){m_SpatialObject=input;}
00066 
00067   void SetInput(SceneType * input){m_Scene=input;}
00068 
00069   itkSetMacro(BinaryPoints,bool);
00070   itkGetMacro(BinaryPoints,bool);
00071 
00072   void SetTransformPrecision(unsigned int precision);
00073   unsigned int GetTransformPrecision();
00074 
00076   itkSetMacro(WriteImagesInSeparateFile,bool);
00077   itkGetMacro(WriteImagesInSeparateFile,bool);
00079 
00080 
00081 protected:
00082   SpatialObjectWriter(const Self&); //purposely not implemented
00083   void operator=(const Self&); //purposely not implemented
00084 
00085   std::string m_FileName;
00086   bool        m_BinaryPoints;
00087   bool        m_WriteImagesInSeparateFile;
00088 
00089   SpatialObjectWriter();
00090   virtual ~SpatialObjectWriter();
00091 
00092 private:
00093 
00094   SpatialObjectPointer           m_SpatialObject;
00095   SceneType *                    m_Scene;
00096 
00097   MetaSceneConverter<NDimensions,PixelType,TMeshTraits> 
00098                                  m_MetaToSpatialConverter;
00099 };
00100 
00101 } // namespace itk
00102 
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATION
00105 #include "itkSpatialObjectWriter.txx"
00106 #endif
00107 
00108 #endif // __itkSpatialObjectWriter_h
00109 

Generated at Mon Apr 14 14:30:02 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000