00001 /*************************************************************************** 00002 vuCellProjector.h - description 00003 ------------------- 00004 begin : Thu May 1 2003 00005 copyright : (C) 2003 by tmeng 00006 email : tmeng@sfu.ca 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef _vuCellProjectorUtility_h_ 00019 #define _vuCellProjectorUtility_h_ 00020 00021 //---------------------------------------------------------------------------- 00022 #include "../vuBasicUtility.h" 00023 #include "../../wxUIElements/vuTransferDialog.h" 00024 #include "vuCamera.h" 00025 #include "Volume/Regular/Unimodal/3d/1B/Intensity/CellProjector/CellProjector.h" 00026 #include "vuTFunc/vuTFDesign.h" 00027 #include "Volume/volume.h" //for getVolume that returns vu1* 00028 00030 00041 class vuCellProjector : public vuBasicUtility 00042 { 00043 public: 00045 vuCellProjector(); 00046 00048 /*virtual*/ ~vuCellProjector(); 00049 00050 public: 00052 static const char* getFileType(); 00053 00054 public: 00055 00057 /*virtual*/ void addRight(wxSizer* sizer); 00058 00060 00063 /*virtual*/ bool init(const char* DataFile); 00064 00066 /*virtual*/ void notifyDataChanged(); 00067 00069 /*virtual*/ void DrawAgain(); 00070 00078 /*virtual*/ void DrawFromImage(); 00079 00082 /*virtual*/ vuImage* getCurrentImage(); 00083 00086 /*virtual*/ vuCamera* getCamera(); 00087 00090 /*virtual*/ bool IsReRendering(); 00091 00093 /*virtual*/ void setIsReRendering(bool isit); 00094 00095 protected: 00097 00100 /*virtual*/ bool glInit(); 00101 00103 00106 /*virtual*/ void glRender(); 00107 00109 /*virtual*/ void glResize(); 00110 00112 00117 /*virtual*/ void glOnMouse(wxMouseEvent &ev); 00118 00120 /*virtual*/ vu1* getVolume(); 00121 00123 00130 /*virtual*/ void OnChar(wxKeyEvent& event); 00131 00133 #if wxMINOR_VERSION < 5 00134 void onCheckBoxIsSort(); 00135 #else 00136 void onCheckBoxIsSort(wxCommandEvent&); 00137 #endif 00138 00140 #if wxMINOR_VERSION < 5 00141 void onListBoxSubdivScheme(); 00142 #else 00143 void onListBoxSubdivScheme(wxCommandEvent&); 00144 #endif 00145 00147 #if wxMINOR_VERSION < 5 00148 void onButtonRender(); 00149 #else 00150 void onButtonRender(wxCommandEvent&); 00151 #endif 00152 00154 void addCheckBoxIsSort(wxSizer* sizer); 00155 00157 void addListBoxSubdivScheme(wxSizer* sizer); 00158 00160 00164 void addButtonRender(wxSizer* sizer); 00165 00166 private: 00168 vu111211a *m_Data; 00169 00171 vuCamera m_Camera; 00172 00174 float m_ViewScale; 00175 00177 vuTFDesign m_TFunc; 00178 00180 vuTransferDialog m_TFDialog; 00181 00183 int m_x; 00185 int m_y; 00186 00187 private: 00189 00192 wxCheckBox* m_checkBoxIsSort; 00193 00195 00199 wxListBox* m_listBoxSubdivScheme; 00200 00201 private: 00202 00203 DECLARE_EVENT_TABLE() 00204 }; 00205 00206 #endif