00001 namespace creaImageIO 00002 { 00006 //===================================================================== 00007 00008 //===================================================================== 00010 class GimmickView 00011 { 00012 public: 00014 GimmickView(); 00016 virtual ~GimmickView(); 00017 00018 //==================================================================== 00019 // General 00020 //==================================================================== 00021 00023 virtual int GetSelectionSize() { return 0; } 00025 virtual bool IsSelectionValid(){ return false; } 00027 virtual void GetSelectedFiles(std::vector<std::string>&){ return; } 00029 virtual void GetSelectedImages(std::vector<vtkImageData*>&){ return; } 00031 virtual void GetSelectedDicomNodes(std::vector<DicomNode*>&){ return; } 00033 virtual DicomNode* GetDicomNodeOfItem(const TreeItemId& i); 00034 00035 00037 typedef std::vector<DicomDatabase*> DicomDatabaseListType; 00039 virtual DicomDatabaseListType& GetDicomDatabaseList() 00040 { return null; } 00042 virtual const DicomDatabaseListType& GetDicomDatabaseList() const 00043 { return null; } 00044 00045 protected: 00047 virtual void OpenOrNewDatabase(bool open){ return; } 00049 virtual void ShowHelp(); 00050 00051 private: 00053 const std::string& GetDatabaseExtension() { return null; } 00055 virtual void SetDatabaseExtension(const std::string& ext){ return; } 00056 00057 00058 //==================================================================== 00059 // Preview Display Related 00060 //==================================================================== 00061 00062 00064 private: 00065 virtual void ShowImage(vtkImageData* image){ return; } 00066 00067 //==================================================================== 00068 // Favorites Related 00069 //==================================================================== 00070 00071 00072 public: 00074 virtual void LoadOrCreateFavoritesDatabase(){ return; } 00075 private: 00077 void CreateUserSettingsDirectory(){ return; } 00079 const std::string& GetUserSettingsDirectory(){ return null; } 00080 00081 //==================================================================== 00082 // Attribute Display Related 00083 //==================================================================== 00084 00085 00087 private: 00088 virtual void ShowInformation(DicomNode*){ return; } 00089 00090 //==================================================================== 00091 // Tree Display Related 00092 //==================================================================== 00093 00094 protected: 00097 virtual void RebuildView(){ return; } 00102 virtual void UpdateDicomDatabaseView(DicomDatabase*){ return; } 00106 virtual void UpdateDicomNodeView(DicomNode* n, const TreeItemId& parent){ return; } 00107 00108 private: 00110 typedef WxGimmickTreeItemData TreeItemData; 00112 TreeItemData* GetItemData(const TreeItemId& id){ return null; } 00114 typedef WxGimmickDicomNodeData NodeData; 00115 00116 00117 //==================================================================== 00118 // Class Attributes 00119 //==================================================================== 00120 00121 00122 int mSelectionType; 00123 int mSelectionMaxImageDimension; 00124 int mCurrentSelectionImageSize[4]; 00125 00127 DicomDatabaseListType mDicomDatabaseList; 00129 DicomDatabase* mFavoriteDatabase; 00130 00132 std::string mDatabaseListFile; 00134 std::string mDatabaseExtension; 00135 00136 bool mJustStarted; 00137 00138 int mFirstDicomDatabaseIconIndex; 00139 00140 // Previewer 00141 vtkImageViewer2* mViewer; 00142 00143 int mx1,mx2,my1,my2,mz1,mz2; 00144 double mspx,mspy,mspz; 00145 00146 // Image preview : 00147 // Multi-thread image reader 00148 MultiThreadImageReader mReader; 00149 // map of images name to node 00150 std::map<std::string,DicomNode*> mImageFileNameToNode; 00151 00152 //Controller which manages the interaction with the model 00153 Gimmick* controller; 00154 00155 }; 00156 // EO class GimmickView 00157 //===================================================================== 00158 00159 } // EO namespace creaImageIO 00160 00161 // EOF 00162 #endif