1 /*============================================================================ 2 MetaIO 3 Copyright 2000-2010 Insight Software Consortium 4 5 Distributed under the OSI-approved BSD License (the "License"); 6 see accompanying file Copyright.txt for details. 7 8 This software is distributed WITHOUT ANY WARRANTY; without even the 9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 See the License for more information. 11 ============================================================================*/ 12 #include "metaTypes.h" 13 14 #ifndef ITKMetaIO_METASCENE_H 15 #define ITKMetaIO_METASCENE_H 16 17 #include "metaUtils.h" 18 #include "metaObject.h" 19 20 #ifdef _MSC_VER 21 #pragma warning ( disable: 4251 ) 22 #endif 23 24 #include <list> 25 26 27 /*! MetaScene (.h and .cpp) 28 * 29 * Description: 30 * Reads and Writes MetaTubeFiles. 31 * 32 * \author Julien Jomier 33 * 34 * \date July, 2002 35 * 36 */ 37 38 #if (METAIO_USE_NAMESPACE) 39 namespace METAIO_NAMESPACE { 40 #endif 41 42 class METAIO_EXPORT MetaScene : public MetaObject 43 { 44 45 ///// 46 // 47 // PUBLIC 48 // 49 //// 50 public: 51 52 typedef METAIO_STL::list<MetaObject*> ObjectListType; 53 54 //// 55 // 56 // Constructors & Destructor 57 // 58 //// 59 MetaScene(void); 60 61 MetaScene(const MetaScene *_scene); 62 63 MetaScene(unsigned int dim); 64 65 ~MetaScene(void); 66 67 void PrintInfo(void) const; 68 69 void CopyInfo(const MetaObject * _object); 70 71 void AddObject(MetaObject* object); 72 73 // 74 // 75 // 76 // This function only reads registered tubes 77 bool Read(const char *_headerName=NULL); 78 79 bool Write(const char *_headName=NULL); 80 81 bool Append(const char* =NULL) {METAIO_STREAM::cout << "Not Implemented !" << METAIO_STREAM::endl;return true;} 82 83 void Clear(void); 84 85 86 // NObjects(...) 87 // Required Field 88 // Number of points wich compose the tube 89 void NObjects(int nobjects); 90 int NObjects(void) const; 91 92 GetObjectList(void)93 ObjectListType * GetObjectList(void) {return & m_ObjectList;} 94 95 //// 96 // 97 // PROTECTED 98 // 99 //// 100 protected: 101 102 bool m_ElementByteOrderMSB; 103 104 void M_Destroy(void); 105 106 void M_SetupReadFields(void); 107 108 void M_SetupWriteFields(void); 109 110 bool M_Read(void); 111 112 bool M_Write(void); 113 114 int m_NObjects; // "NObjects = " 0 115 116 ObjectListType m_ObjectList; 117 118 }; 119 120 #if (METAIO_USE_NAMESPACE) 121 }; 122 #endif 123 124 #endif 125