X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOGimmickView.h;h=8407a9179cb22008dbcdd940e934862777b0f10d;hb=3e7eac431db6401f86374784eaa66ad276af1bac;hp=3aa98acf92f9a58ff285c71543722b5f53b83808;hpb=19b4ff2b6d359e79a7f723dea0e5cf500e7d619c;p=creaImageIO.git diff --git a/src2/creaImageIOGimmickView.h b/src2/creaImageIOGimmickView.h index 3aa98ac..8407a91 100644 --- a/src2/creaImageIOGimmickView.h +++ b/src2/creaImageIOGimmickView.h @@ -1,3 +1,19 @@ +#ifndef __creaImageIOGimmickView_h_INCLUDED__ +#define __creaImageIOGimmickView_h_INCLUDED__ + +#include +#include +#include + +//#include +#include + +#define GIMMICK_NO_IMAGE_SELECTION 0 +#define GIMMICK_2D_IMAGE_SELECTION 2 +#define GIMMICK_3D_IMAGE_SELECTION 3 +#define GIMMICK_4D_IMAGE_SELECTION 4 + + namespace creaImageIO { /** @@ -11,10 +27,66 @@ namespace creaImageIO { public: /// Ctor - GimmickView(); + GimmickView(Gimmick* ); /// Virtual destructor virtual ~GimmickView(); + + /// Initializes the view : + /// Creates the TreeViews for all the TreeHandler of the Controller + /// + virtual void Initialize(); + + /// Type of map from View name to TreeView* + /// (This map is equivalent for Views of the TreeHandlerMap of Gimmick) + typedef std::map TreeViewMapType; + + /// Returns the TreeViewMap (ref) + TreeViewMapType& GetTreeViewMap() { return mTreeViewMap; } + /// Returns the TreeViewMap (const ref) + const TreeViewMapType& GetTreeViewMap() const + { return mTreeViewMap; } + + /// Finalize + virtual void Finalize(); + ///Returns the selected Images and validates to see if they comply with the given parameter(<4D) + vtkImageData* GetSelectedImage(int dim); + ///Adds the selected Images to the given vector and validates to see if they comply with the given parameter (4D) + virtual void GetSelectedImages(std::vector& s, int dim) {} + + virtual void GetSelectedFiles(std::vector& s) {} + + /// Create the tree views + void CreateTreeViews(); + + /// Create the tree view for TreeHandler provided + virtual void CreateTreeView( TreeHandler*) + { GimmickError("INTERNAL ERROR : CreateTreeView not implemented"); } + + /// Updates the TreeView of given name from level l to bottom + /// (calls the virtual method TreeView::UpdateLevel(l)) + virtual void UpdateTreeViewLevel(const std::string&, int l); + + private: + /// Controller which manages the interaction with the model + Gimmick* mGimmick; + /// The views + TreeViewMapType mTreeViewMap; + + }; + // EO class GimmickView + //===================================================================== + + + /* + + + + + + + + //==================================================================== // General //==================================================================== @@ -148,15 +220,9 @@ namespace creaImageIO MultiThreadImageReader mReader; // map of images name to node std::map mImageFileNameToNode; - - //Controller which manages the interaction with the model - Gimmick* controller; - - }; - // EO class GimmickView - //===================================================================== - + */ + } // EO namespace creaImageIO // EOF -#endif \ No newline at end of file +#endif