creaImageIO_lib
OldcreaImageIOGimmickView.h
Go to the documentation of this file.
1 /*
2 # ---------------------------------------------------------------------
3 #
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # pour la Santé)
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
9 #
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.
16 #
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
21 # liability.
22 #
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 # ------------------------------------------------------------------------
26 */
27 
28 namespace creaImageIO
29 {
33  //=====================================================================
34 
35  //=====================================================================
37  class GimmickView
38  {
39  public:
41  GimmickView();
43  virtual ~GimmickView();
44 
45  //====================================================================
46  // General
47  //====================================================================
48 
50  virtual int GetSelectionSize() { return 0; }
52  virtual bool IsSelectionValid(){ return false; }
54  virtual void GetSelectedFiles(std::vector<std::string>&){ return; }
56  virtual void GetSelectedImages(std::vector<vtkImageData*>&){ return; }
58  virtual void GetSelectedDicomNodes(std::vector<DicomNode*>&){ return; }
60  virtual DicomNode* GetDicomNodeOfItem(const TreeItemId& i);
61 
62 
64  typedef std::vector<DicomDatabase*> DicomDatabaseListType;
67  { return null; }
70  { return null; }
71 
72  protected:
74  virtual void OpenOrNewDatabase(bool open){ return; }
76  virtual void ShowHelp();
77 
78  private:
80  const std::string& GetDatabaseExtension() { return null; }
82  virtual void SetDatabaseExtension(const std::string& ext){ return; }
83 
84 
85  //====================================================================
86  // Preview Display Related
87  //====================================================================
88 
89 
91  private:
92  virtual void ShowImage(vtkImageData* image){ return; }
93 
94  //====================================================================
95  // Favorites Related
96  //====================================================================
97 
98 
99  public:
101  virtual void LoadOrCreateFavoritesDatabase(){ return; }
102  private:
104  void CreateUserSettingsDirectory(){ return; }
106  const std::string& GetUserSettingsDirectory(){ return null; }
107 
108  //====================================================================
109  // Attribute Display Related
110  //====================================================================
111 
112 
114  private:
115  virtual void ShowInformation(DicomNode*){ return; }
116 
117  //====================================================================
118  // Tree Display Related
119  //====================================================================
120 
121  protected:
124  virtual void RebuildView(){ return; }
129  virtual void UpdateDicomDatabaseView(DicomDatabase*){ return; }
133  virtual void UpdateDicomNodeView(DicomNode* n, const TreeItemId& parent){ return; }
134 
135  private:
137  typedef WxGimmickTreeItemData TreeItemData;
139  TreeItemData* GetItemData(const TreeItemId& id){ return null; }
141  typedef WxGimmickDicomNodeData NodeData;
142 
143 
144  //====================================================================
145  // Class Attributes
146  //====================================================================
147 
148 
152 
156  DicomDatabase* mFavoriteDatabase;
157 
159  std::string mDatabaseListFile;
161  std::string mDatabaseExtension;
162 
164 
166 
167  // Previewer
168  vtkImageViewer2* mViewer;
169 
171  double mspx,mspy,mspz;
172 
173  // Image preview :
174  // Multi-thread image reader
176  // map of images name to node
177  std::map<std::string,DicomNode*> mImageFileNameToNode;
178 
179  //Controller which manages the interaction with the model
181 
182  };
183  // EO class GimmickView
184  //=====================================================================
185 
186 } // EO namespace creaImageIO
187 
188 // EOF
189 #endif