00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkScene.h,v $ 00005 Language: C++ 00006 Date: $Date: 2002/07/17 01:45:37 $ 00007 Version: $Revision: 1.3 $ 00008 00009 Copyright (c) 2002 Insight 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 00018 #ifndef __Scene_h 00019 #define __Scene_h 00020 00021 #include "itkNDimensionalSpatialObject.h" 00022 00023 #include <list> 00024 00025 namespace itk 00026 { 00027 00037 template <unsigned int PipelineDimension = 3> 00038 class Scene 00039 : public Object 00040 { 00041 00042 public: 00043 00044 typedef Scene<PipelineDimension> Self; 00045 typedef Object Superclass; 00046 typedef Superclass::Pointer SuperclassPointer; 00047 typedef SmartPointer< Self > Pointer; 00048 typedef SmartPointer< const Self > ConstPointer; 00049 00050 typedef std::list< NDimensionalSpatialObject<> * > ObjectListType; 00051 00053 itkNewMacro(Self); 00054 itkTypeMacro(Self, Superclass); 00055 00057 void AddSpatialObject( NDimensionalSpatialObject<> * pointer ); 00058 00063 void RemoveSpatialObject( NDimensionalSpatialObject<> * object ); 00064 00066 ObjectListType & GetObjects( void ); 00067 00069 unsigned int GetNumberOfObjects( void ); 00070 00072 void SetObjects( ObjectListType & children ); 00073 00076 unsigned long GetMTime( void ) const; 00077 00079 void SetParentId(int parentid) {m_ParentId=parentid;} 00080 int GetParentId(void) {return m_ParentId;} 00081 00083 NDimensionalSpatialObject<> * GetObjectById(int Id); 00084 00085 protected: 00086 00088 ObjectListType m_Objects; 00089 00091 Scene(); 00092 00094 virtual ~Scene(); 00095 00097 virtual void PrintSelf( std::ostream& os, Indent indent ) const; 00098 00100 int m_ParentId; 00101 00102 }; 00103 00104 } // end of namespace itk 00105 00106 00107 #ifndef ITK_MANUAL_INSTANTIATION 00108 #include "itkScene.txx" 00109 #endif 00110 00111 #endif // __Scene_h