1 #ifndef __creaImageIOTreeView_h_INCLUDED__
2 #define __creaImageIOTreeView_h_INCLUDED__
4 #include <creaImageIOTreeHandler.h>
5 #include <creaImageIOSystem.h>
6 #include <vtkImageData.h>
14 //=====================================================================
16 //=====================================================================
17 /// Abstract class that handles the view of a Tree through its TreeHandler
22 TreeView(TreeHandler*);
23 /// Virtual destructor
27 /// Updates the view of a level given the selected items of upper level
28 virtual void UpdateLevel( int )
29 { GimmickError("INTERNAL ERROR : TreeView::UpdateLevel not overloaded");}
31 ///Removes selected nodes on given level
32 virtual void RemoveSelected( int )
33 { GimmickError("INTERNAL ERROR : TreeView::RemoveSelected not overloaded");}
35 ///Validates the selected images
36 virtual void ValidateSelectedImages()
37 { GimmickError("INTERNAL ERROR : TreeView::ValidateSelected not overloaded");}
38 ///Returns the selected data as vtkImageData
39 vtkImageData* GetSelectedImage(int dim)
40 { GimmickError("INTERNAL ERROR : TreeView::GetSelectedImage not overloaded");}
41 ///Returns the selected data as a vector of vtkImageData (4D)
42 virtual void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
43 { GimmickError("INTERNAL ERROR : TreeView::GetSelectedImages not overloaded");}
45 ///Sets the maximum dimension allowed for selections
46 void SetMaxDimension(int maxdim){ mSelectionMaxDimension=maxdim; }
47 ///Sets the minimum dimension allowed for selections
48 void SetMinDimension(int mindim){ mSelectionMinDimension=mindim; }
49 ///Sets the output dimension desired for selections
50 void SetOutputDimension(int outdim){ mOutputDimension=outdim; }
53 TreeHandler* GetTreeHandler() { return mTreeHandler; }
54 ///Gets the maximum dimension allowed for selections
55 int GetMaxDimension(){ return mSelectionMaxDimension; }
56 ///Gets the minimum dimension allowed for selections
57 int GetMinDimension(){ return mSelectionMinDimension; }
58 ///Gets the output dimension desired for selections
59 int GetOutputDimension(){ return mOutputDimension; }
62 /// The TreeHandler with which it corresponds
63 TreeHandler* mTreeHandler;
64 //The selection's maximum dimension
65 int mSelectionMaxDimension;
66 //The selection's minimum dimension
67 int mSelectionMinDimension;
68 //The user desired output dimension
72 //=====================================================================
75 } // EO namespace creaImageIO