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: 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 __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   typedef SpatialObject<NDimensions>          SpatialObjectType;
00043   typedef typename SpatialObjectType::Pointer SpatialObjectPointer;
00044 
00045   typedef GroupSpatialObject<NDimensions> GroupType;
00046   typedef typename GroupType::Pointer     GroupPointer;
00047   
00048   typedef SceneSpatialObject<NDimensions> SceneType;
00049   typedef typename SceneType::Pointer     ScenePointer;
00050 
00052   itkNewMacro(Self);
00053 
00055   typedef Object Superclass;
00056   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;}
00072 
00074   const MetaEvent* GetEvent() {return m_MetaToSpatialConverter.GetEvent();}
00075   void SetEvent(MetaEvent* event) {m_MetaToSpatialConverter.SetEvent(event);} 
00077 
00078 protected:
00079   SpatialObjectReader(const Self&); //purposely not implemented
00080   void operator=(const Self&); //purposely not implemented
00081 
00082   std::string m_FileName;
00083 
00084   SpatialObjectReader();
00085   virtual ~SpatialObjectReader();
00086 
00087 private:
00088 
00089   ScenePointer m_Scene;
00090   GroupPointer m_Group;
00091 
00092   MetaSceneConverter<NDimensions,PixelType,TMeshTraits> m_MetaToSpatialConverter;
00093 };
00094 
00095 } // namespace itk
00096 
00097 
00098 #ifndef ITK_MANUAL_INSTANTIATION
00099 #include "itkSpatialObjectReader.txx"
00100 #endif
00101 
00102 #endif // __itkSpatialObjectReader_h
00103 

Generated at Sun Sep 23 14:19:06 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000