MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLCSO/CSOBase/CSOVoxelSet/CSOVoxelSetList.h
Go to the documentation of this file.
00001 // **InsertLicense** code
00002 //----------------------------------------------------------------------------------
00005 
00010 //----------------------------------------------------------------------------------
00011 
00012 #ifndef __CSOVoxelSetList_H
00013 #define __CSOVoxelSetList_H
00014 
00015 
00016 #include "MLCSOIncludes.h"
00017 
00018 
00019 ML_START_NAMESPACE
00020 
00021 
00022 class CSOVoxelSet;
00023 class CSOVoxelSetGroup;
00024 class CSOList;
00025 
00027 
00028 class MLCSO_EXPORT CSOVoxelSetList : public Base
00029 {
00030 
00031 public:
00032 
00034   CSOVoxelSetList();
00035   
00037   virtual ~CSOVoxelSetList();
00038   
00040   void destroy();
00041   
00045   void setupInternalStructureAsCSOList(CSOList* csoList, PagedImage* image=NULL);
00046 
00049   void setupInternalStructureAsImage(PagedImage* image);
00050 
00052   int numCSOVoxelSet() const { return static_cast<int>(_csoVoxelSets.size()); }
00054   CSOVoxelSet* csoVoxelSetAt(size_t index) const { return _csoVoxelSets[index]; }
00056   CSOVoxelSet* csoVoxelSetWithId(int id);
00058   CSOVoxelSet* addCSOVoxelSet();
00059   
00061   int numCSOVoxelSetGroup() const { return static_cast<int>(_csoVoxelSetGroups.size()); }
00063   CSOVoxelSetGroup* csoVoxelSetGroupAt(size_t index) const { return _csoVoxelSetGroups[index]; }
00065   CSOVoxelSetGroup* csoVoxelSetGroupWithId(int id);
00067   CSOVoxelSetGroup* addCSOVoxelSetGroup();
00069   int getMaxTimepointIndex();
00072   bool isInsideImage(const Vector3& position);
00075   const SubImageBox& getImageBox() const { return _imageBox; }
00077   void setSubImageBox(const SubImageBox& subImageBox) { _imageBox = subImageBox; }
00078 
00080 
00081   virtual void addStateToTree(TreeNode* parent) const;
00082   // Sets current version number
00083   ML_SET_ADDSTATE_VERSION(2);
00085   virtual void readStateFromTree(TreeNode* parent);
00086 
00087 
00088 protected:
00089 
00090   // nothing so far
00091 
00092 private:    
00093  
00094   /* MEMBER VARIABLES */
00095   
00097   std::vector<CSOVoxelSet*> _csoVoxelSets;
00099   std::vector<CSOVoxelSetGroup*> _csoVoxelSetGroups;
00100   
00101   SubImageBox _imageBox;
00102 
00103   /* METHODS */
00104 
00105   void _loadVersion(TreeNode* parent, int version);
00106 
00107   ML_CLASS_HEADER(CSOVoxelSetList)
00108 };
00109 
00111 
00112 
00113 ML_END_NAMESPACE
00114 
00115 
00116 #endif // __CSOVoxelSetList_H
00117