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: 2009-04-25 12:25:45 $
00007   Version:   $Revision: 1.15 $
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 
00033 template <unsigned int NDimensions = 3, 
00034           typename PixelType = unsigned char,
00035           typename TMeshTraits = DefaultStaticMeshTraits< PixelType ,
00036                                                           NDimensions,
00037                                                           NDimensions >
00038          >
00039 class SpatialObjectWriter : public Object
00040 {
00041 public:
00042 
00044   typedef SpatialObjectWriter Self;
00045   typedef SmartPointer<Self>  Pointer;
00046 
00047   typedef SpatialObject<NDimensions> SpatialObjectType; 
00048   typedef typename SpatialObjectType::Pointer SpatialObjectPointer; 
00049   typedef SceneSpatialObject<NDimensions> SceneType; 
00050 
00052   itkNewMacro(Self);
00053 
00055   typedef Object Superclass;
00056   itkTypeMacro(SpatialObjectWriter, Object);
00058 
00060   void Update(void);
00061 
00063   itkSetStringMacro(FileName);
00064 
00066   itkGetStringMacro(FileName);
00067 
00069   void SetInput(SpatialObjectType * input){m_SpatialObject=input;}
00070 
00071   void SetInput(SceneType * input){m_Scene=input;}
00072 
00073   itkSetMacro(BinaryPoints,bool);
00074   itkGetConstMacro(BinaryPoints,bool);
00075 
00076   void SetTransformPrecision(unsigned int precision);
00077   unsigned int GetTransformPrecision();
00078 
00080   itkSetMacro(WriteImagesInSeparateFile,bool);
00081   itkGetConstMacro(WriteImagesInSeparateFile,bool);
00083 
00084 
00085 protected:
00086   SpatialObjectWriter(const Self&); //purposely not implemented
00087   void operator=(const Self&); //purposely not implemented
00088 
00089   std::string m_FileName;
00090   bool        m_BinaryPoints;
00091   bool        m_WriteImagesInSeparateFile;
00092 
00093   SpatialObjectWriter();
00094   virtual ~SpatialObjectWriter();
00095 
00096 private:
00097 
00098   SpatialObjectPointer           m_SpatialObject;
00099   SceneType *                    m_Scene;
00100 
00101   MetaSceneConverter<NDimensions,PixelType,TMeshTraits> 
00102                                  m_MetaToSpatialConverter;
00103 };
00104 
00105 } // namespace itk
00106 
00107 
00108 #ifndef ITK_MANUAL_INSTANTIATION
00109 #include "itkSpatialObjectWriter.txx"
00110 #endif
00111 
00112 #endif // __itkSpatialObjectWriter_h
00113 

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