2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
29 #ifndef __creaImageIOTreeView_h_INCLUDED__
30 #define __creaImageIOTreeView_h_INCLUDED__
32 #include <creaImageIOTreeHandler.h>
33 #include <creaImageIOTimestampDatabaseHandler.h>
34 #include <creaImageIOSystem.h>
35 #include <vtkImageData.h>
46 //=====================================================================
48 //=====================================================================
49 /// Abstract class that handles the view of a Tree through its TreeHandler
54 TreeView(TreeHandler*,GimmickView*);
55 /// Virtual destructor
59 /// Updates the view of a level given the selected items of upper level
60 virtual void UpdateLevel( int )
61 { GimmickError("INTERNAL ERROR : TreeView::UpdateLevel not overloaded");}
63 ///Removes selected nodes
64 virtual void RemoveSelected(std::string &i_save )
65 { GimmickError("INTERNAL ERROR : TreeView::RemoveSelected not overloaded");}
67 ///Validates the selected images
68 virtual void ValidateSelectedImages()
69 { GimmickError("INTERNAL ERROR : TreeView::ValidateSelected not overloaded");}
71 ///Returns the last selected level
72 virtual unsigned int GetLastSelectedLevel(){GimmickError("INTERNAL ERROR : TreeView::GetLastSelectedLevel not overloaded");}
74 ///Returns the maximum number of levels
75 virtual int GetNumberOfLevels(){ GimmickError("INTERNAL ERROR : TreeView::GetLevels not overloaded"); }
76 ///Gets the current selections filenames
77 virtual void GetSelectedAsString(std::vector<std::string>&s){ GimmickError("INTERNAL ERROR : TreeView::GetSelectedAsString not overloaded"); }
79 /// Gets the user selected data from the level passed as a parameter
80 virtual const std::vector<tree::Node*>& GetSelected(int level){ GimmickError("INTERNAL ERROR : TreeView::GetSelected not overloaded"); }
82 /// Gets the next nodes on the list, be it up(true) or down(false).
83 virtual void GetNodes(std::vector<tree::Node*>& nodes, bool direction){ GimmickError("INTERNAL ERROR : TreeView::GetNodes not overloaded"); }
85 /// Gets the attributes that are being shown and the ones that have been blocked on a specific level
86 virtual void GetAttributes(std::vector<std::string>& areShown, std::vector<std::string>& notShown, int level){ GimmickError("INTERNAL ERROR : TreeView::GetAttributes not overloaded"); }
88 ///Sets the non visible attributes and refreshes the GUI
89 virtual void SetNonVisibleAttributes(const std::vector<std::string>& notShown, int level){ GimmickError("INTERNAL ERROR : TreeView::SetNonVisibleAttributes not overloaded"); }
91 ///Creates a new listctrl
92 virtual void CreateCtrl(std::vector<std::string>& notShown, int nlevel){ GimmickError("INTERNAL ERROR : TreeView::CreateCtrl not overloaded"); }
95 TreeHandler* GetTreeHandler() { return mTreeHandler; }
96 GimmickView* GetGimmickView() { return mGimmickView; }
99 /// The TreeHandler with which it corresponds
100 TreeHandler* mTreeHandler;
101 /// The GimmickView which holds the TreeView
102 GimmickView* mGimmickView;
106 //=====================================================================
109 } // EO namespace creaImageIO