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: 2009-01-16 11:37:57 $
00007   Version:   $Revision: 1.14 $
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 
00035 template <unsigned int NDimensions = 3, 
00036           typename PixelType = unsigned char,
00037           typename TMeshTraits = DefaultStaticMeshTraits< PixelType , NDimensions, NDimensions >
00038          >
00039 class SpatialObjectReader : public Object
00040 {
00041 public:
00042 
00044   typedef SpatialObjectReader                 Self;
00045   typedef SmartPointer<Self>                  Pointer;
00046   typedef SpatialObject<NDimensions>          SpatialObjectType;
00047   typedef typename SpatialObjectType::Pointer SpatialObjectPointer;
00048 
00049   typedef GroupSpatialObject<NDimensions> GroupType;
00050   typedef typename GroupType::Pointer     GroupPointer;
00051   
00052   typedef SceneSpatialObject<NDimensions> SceneType;
00053   typedef typename SceneType::Pointer     ScenePointer;
00054 
00056   itkNewMacro(Self);
00057 
00059   typedef Object Superclass;
00060   itkTypeMacro(SpatialObjectReader, Object);
00062 
00064   void Update(void);
00065 
00067   itkSetStringMacro(FileName);
00068 
00070   itkGetStringMacro(FileName);
00071 
00073   ScenePointer GetScene(void) {return m_Scene;}
00074   GroupPointer GetGroup(void) {return m_Group;}
00076 
00078   const MetaEvent* GetEvent() {return m_MetaToSpatialConverter.GetEvent();}
00079   void SetEvent(MetaEvent* event) {m_MetaToSpatialConverter.SetEvent(event);} 
00081 
00082 protected:
00083   SpatialObjectReader(const Self&); //purposely not implemented
00084   void operator=(const Self&); //purposely not implemented
00085 
00086   std::string m_FileName;
00087 
00088   SpatialObjectReader();
00089   virtual ~SpatialObjectReader();
00090 
00091 private:
00092 
00093   ScenePointer m_Scene;
00094   GroupPointer m_Group;
00095 
00096   MetaSceneConverter<NDimensions,PixelType,TMeshTraits> m_MetaToSpatialConverter;
00097 };
00098 
00099 } // namespace itk
00100 
00101 
00102 #ifndef ITK_MANUAL_INSTANTIATION
00103 #include "itkSpatialObjectReader.txx"
00104 #endif
00105 
00106 #endif // __itkSpatialObjectReader_h
00107 

Generated at Fri Apr 16 19:44:11 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000