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

itkSpatialObjectReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSpatialObjectReader.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/01/21 20:19:32 $
00007   Version:   $Revision: 1.9 $
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 __itkSpatialObjectReader_h
00018 #define __itkSpatialObjectReader_h
00019 
00020 #include "itkMetaSceneConverter.h"
00021 #include "itkSpatialObject.h"
00022 #include "itkGroupSpatialObject.h"
00023 #include "itkProcessObject.h"
00024 #include "itkSceneSpatialObject.h"
00025 #include "itkMetaEvent.h"
00026 #include <itkDefaultStaticMeshTraits.h>
00027 
00028 namespace itk
00029 {
00030 
00031 template <unsigned int NDimensions = 3, 
00032           typename PixelType = unsigned char,
00033           typename TMeshTraits = DefaultStaticMeshTraits< PixelType , NDimensions, NDimensions >
00034          >
00035 class SpatialObjectReader : public Object
00036 {
00037 public:
00038 
00040   typedef SpatialObjectReader Self;
00041   typedef SmartPointer<Self> Pointer;
00042 
00043   typedef SpatialObject<NDimensions> SpatialObjectType;
00044   typedef typename SpatialObjectType::Pointer SpatialObjectPointer;
00045 
00046   typedef GroupSpatialObject<NDimensions> GroupType;
00047   typedef typename GroupType::Pointer GroupPointer;
00048   
00049   typedef SceneSpatialObject<NDimensions> SceneType;
00050   typedef typename SceneType::Pointer ScenePointer;
00051 
00053   itkNewMacro(Self);
00054   
00056   typedef Object Superclass;
00057   itkTypeMacro(SpatialObjectReader, Object);
00058 
00060   void Update(void);
00061 
00063   itkSetStringMacro(FileName);
00064 
00066   itkGetStringMacro(FileName);
00067 
00069   ScenePointer GetScene(void) {return m_Scene;}
00070   GroupPointer GetGroup(void) {return m_Group;}
00071 
00073   const MetaEvent* GetEvent() {return m_MetaToSpatialConverter.GetEvent();}
00074   void SetEvent(MetaEvent* event) {m_MetaToSpatialConverter.SetEvent(event);} 
00075 
00076 protected:
00077   std::string m_FileName;
00078 
00079   SpatialObjectReader();
00080   virtual ~SpatialObjectReader();
00081 
00082 private:
00083 
00084   ScenePointer m_Scene;
00085   GroupPointer m_Group;
00086   MetaSceneConverter<NDimensions,PixelType,TMeshTraits> m_MetaToSpatialConverter;
00087 };
00088 
00089 } // namespace itk
00090 
00091 
00092 #ifndef ITK_MANUAL_INSTANTIATION
00093 #include "itkSpatialObjectReader.txx"
00094 #endif
00095 
00096 #endif // __itkSpatialObjectReader_h

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