]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeView.h
Added validation function (visible in ok button being enabled or not)
[creaImageIO.git] / src2 / creaImageIOTreeView.h
index df5f92f25b32ed8b1cf387b1b6853062864ff06c..de4f7f23bd621f474f30e9a97a71a793cf399204 100644 (file)
@@ -2,12 +2,15 @@
 #define __creaImageIOTreeView_h_INCLUDED__
 
 #include <creaImageIOTreeHandler.h>
+#include <creaImageIOSystem.h>
+#include <vtkImageData.h>
 
 namespace creaImageIO
 {
   /**
    * \ingroup View
    */
+       
   //=====================================================================
   
   //=====================================================================
@@ -21,17 +24,54 @@ namespace creaImageIO
       virtual ~TreeView();
 
       
-      /// Something like that ...
-      virtual void UpdateView();
-      
+      /// Updates the view of a level given the selected items of upper level
+      virtual void UpdateLevel( int ) 
+      { GimmickError("INTERNAL ERROR : TreeView::UpdateLevel not overloaded");}
+
+         ///Removes selected nodes on given level
+         virtual void RemoveSelected( int )
+         { GimmickError("INTERNAL ERROR : TreeView::RemoveSelected not overloaded");}
+
+         ///Validates the selected images
+      virtual void ValidateSelectedImages()
+         { GimmickError("INTERNAL ERROR : TreeView::ValidateSelected not overloaded");}
+         ///Returns the selected data as vtkImageData
+         vtkImageData* GetSelectedImage(int dim)
+         { GimmickError("INTERNAL ERROR : TreeView::GetSelectedImage not overloaded");}
+    ///Returns the selected data as a vector of vtkImageData (4D)
+         virtual void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
+         { GimmickError("INTERNAL ERROR : TreeView::GetSelectedImages not overloaded");}
+
+         ///Sets the maximum dimension allowed for selections
+         void SetMaxDimension(int maxdim){ mSelectionMaxDimension=maxdim; }
+         ///Sets the minimum dimension allowed for selections
+         void SetMinDimension(int mindim){ mSelectionMinDimension=mindim; }
+         ///Sets the output dimension desired for selections
+         void SetOutputDimension(int outdim){ mOutputDimension=outdim; }
+    
+    protected:
+      TreeHandler* GetTreeHandler() { return mTreeHandler; }
+         ///Gets the maximum dimension allowed for selections
+         int GetMaxDimension(){ return mSelectionMaxDimension; }
+         ///Gets the minimum dimension allowed for selections
+         int GetMinDimension(){ return mSelectionMinDimension; }
+         ///Gets the output dimension desired for selections
+         int GetOutputDimension(){ return mOutputDimension; }
 
     private:
       /// The TreeHandler with which it corresponds
       TreeHandler* mTreeHandler;
+         //The selection's maximum dimension
+         int mSelectionMaxDimension;
+         //The selection's minimum dimension
+         int mSelectionMinDimension;
+         //The user desired output dimension
+         int mOutputDimension;
     };
     // EO class TreeView
     //=====================================================================
   
+  
 } // EO namespace creaImageIO
 
 // EOF