X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src2%2FcreaImageIOGimmickView.h;h=a521f8de820c75a4053fa08102dc1e4f52bbb138;hb=2f0e50f69eb904d629cf8db62eb9a4094db93097;hp=3aa98acf92f9a58ff285c71543722b5f53b83808;hpb=19b4ff2b6d359e79a7f723dea0e5cf500e7d619c;p=creaImageIO.git diff --git a/src2/creaImageIOGimmickView.h b/src2/creaImageIOGimmickView.h index 3aa98ac..a521f8d 100644 --- a/src2/creaImageIOGimmickView.h +++ b/src2/creaImageIOGimmickView.h @@ -1,3 +1,23 @@ +#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 + +#define NATIVE 0 +#define _2D 2 +#define _3D 3 + + namespace creaImageIO { /** @@ -11,10 +31,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 +224,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