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: 2005/05/06 15:27:07 $
00007   Version:   $Revision: 1.11 $
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);
00053 
00055   void Update(void);
00056 
00058   itkSetStringMacro(FileName);
00059 
00061   itkGetStringMacro(FileName);
00062 
00064   void SetInput(SpatialObjectType * input){m_SpatialObject=input;}
00065 
00066   void SetInput(SceneType * input){m_Scene=input;}
00067 
00068   itkSetMacro(BinaryPoints,bool);
00069   itkGetMacro(BinaryPoints,bool);
00070 
00071   void SetTransformPrecision(unsigned int precision);
00072   unsigned int GetTransformPrecision();
00073 
00075   itkSetMacro(WriteImagesInSeparateFile,bool);
00076   itkGetMacro(WriteImagesInSeparateFile,bool);
00077 
00078 
00079 protected:
00080 
00081   std::string m_FileName;
00082   bool        m_BinaryPoints;
00083   bool        m_WriteImagesInSeparateFile;
00084 
00085   SpatialObjectWriter();
00086   virtual ~SpatialObjectWriter();
00087 
00088 private:
00089 
00090   SpatialObjectPointer           m_SpatialObject;
00091   SceneType *                    m_Scene;
00092 
00093   MetaSceneConverter<NDimensions,PixelType,TMeshTraits> 
00094                                  m_MetaToSpatialConverter;
00095 };
00096 
00097 } // namespace itk
00098 
00099 
00100 #ifndef ITK_MANUAL_INSTANTIATION
00101 #include "itkSpatialObjectWriter.txx"
00102 #endif
00103 
00104 #endif // __itkSpatialObjectWriter_h

Generated at Thu May 25 00:06:13 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000