/*========================================================================= Program: wxMaracas Module: $RCSfile: wxMaracasFrame02.h,v $ Language: C++ Date: $Date: 2008/10/31 16:32:10 $ Version: $Revision: 1.1 $ Copyright: (c) 2002, 2003 License: This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #ifndef __WX__MARACAS__FRAME02__HXX__ #define __WX__MARACAS__FRAME02__HXX__ //#include //#include #include "wxMaracasPathology_01.h" #include "marTypes.h" #include "wxMaracas3DBrowser.h" #include "wxMaracasQuantification.h" #include "widgets/wxSurfaceSTLWidget.h" #include "wxMaracasMPR.h" #include "wxMaracasProcessingCT.h" #include "wxMaracasEmptyPanel.h" #include "wxMaracasEmptyPanel_2.h" #include "wxMaracasEmptyPanel_3.h" #include "wxMaracasQuantificationCT.h" #include "wxMaracasImageBrowser02.h" #include "wxMaracas_ManualTree_MPR.h" #include "wxMaracas_ManualContour_Panel.h" #include "widgets/wxManualRegistration3D.h" #include "widgets/wxManualRegistration3D.h" #include "wxMaracas_SegmentationFM3D.h" #include "wxMaracas_ManualSegmentation_MPR.h" //EED 15Avril2008 using namespace std; //EED 15Avril2008 #include "ILPD/src/wxInterface/wxILPD.h" #include "wxILPDwithImage.h" class marInterface; class marInterfaceCT; // EED 3 nov 2006 class FileInfoNode { public: FileInfoNode(string filename, string dirfile); ~FileInfoNode(); string GetFileName(); string GetFileNameParent(); void SetFileNameParent(string parent); string GetDirFile(); private: std::string _dirfile; std::string _filename; std::string _filenameParent; FileInfoNode *_parentNode; std::vector _lstFileInfoNodeChildrens; protected: }; class FileInformationModel { public: FileInformationModel(); ~FileInformationModel(); void ResetModel(); void ReadModel(string dirFile); int GetSizeLstFile(); string GetFileName(int i); int GetSizeLstFile_filter(); string GetFileName_filter(int i); void Filtre_1(string filtre); void LinkRelations(); private: string _filtre_1; std::vector _lstFileInfoNodes; protected: }; class wxReadWriteConf: public wxDialog { public: wxReadWriteConf(wxWindow *parent,string parentFile); ~wxReadWriteConf(); void eventBtnWorkDirectory(wxCommandEvent &event); void eventBtnReadFile(wxCommandEvent &event); void eventBtnWriteFile(wxCommandEvent &event); void eventBtnReWriteFile(wxCommandEvent &event); void OnShowFile01(wxCommandEvent &event); void OnShowFile02(wxCommandEvent &event); string GetNameWriteFile(); string GetNameReadFile(); string GetWorkDirectory(); string GetParentFile(); protected: private: static string _workDirectory; string _nameWriteFile; string _nameReadFile; string _parentFile; wxStaticText *_directoryTXT; FileInformationModel *_fim; wxListBox *_wxlstFiles; wxListBox *_wxlstAllFiles; wxTextCtrl *_wxviewinfo; wxWindow *CreateReadModule(wxWindow *parent); wxWindow *CreateListFilesModule(wxWindow *parent); wxWindow *CreateReadFileModule(wxWindow *parent); wxWindow *CreateListAllFilesModule(wxWindow *parent); void RefreshReadFilesList(); void RefreshAllFilesList(); void ShowInformation(wxListBox *wxlistbox , wxTextCtrl* wxtextctrl ); void ResetView(); }; /** * \brief Principal Frame of the application * MARACAS: MAgnetic Resonance Angiography Computer ASsisted analysis * */ class MAR_INTERFACEWX_EXPORT wxMaracasFrame02: public wxFrame { public: wxMaracasFrame02( wxFrame *parent, wxWindowID id = -1, marInterface* mar = NULL, marInterfaceCT* marCT = NULL, char *dictionaryFileName=NULL, const wxString& title = wxT("MARACAS: MAgnetic Resonance Angiography Computer ASsisted analysis"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE); void RecreateToolbar( ); void OnQuit( wxCloseEvent& event ); void OnLoadPatientData( wxCommandEvent& event ); void OnParameters( wxCommandEvent& event ); // EED Borrme not used void OnLoadImageData( wxListEvent& event ); void OnLoadImageData02( wxCommandEvent& event ); void OnStartExperiment( wxCommandEvent& event ); void OnHelp (wxCommandEvent& event ); void OnQuant (wxCommandEvent& event ); void OnQuantificationCT (wxCommandEvent& event ); void OnAboutCreatis( wxCommandEvent& event ); void OnStl (wxCommandEvent& event ); void OnNewAxis(wxCommandEvent &WXUNUSED(event)); void OnDeleteAxis(wxCommandEvent &WXUNUSED(event)); void OnRegenerateAll( wxCommandEvent& event ); void OnRegenerateSplineAxe( wxCommandEvent& event ); void OnCleanContours( wxCommandEvent& event ); void OnRegenerateSignal( wxCommandEvent& event ); void OnMPR(wxCommandEvent& event ); void OnProcessingCT(wxCommandEvent& event ); void OnEmptyPanel(wxCommandEvent& event ); void OnEmptyPanel_2(wxCommandEvent& event ); private: wxMaracas3DBrowser *_wxmaracas3dbrowser; wxMaracasQuantification *_wxmaracasquantification; wxMaracasQuantificationCT *_wxmaracasquantification_ct; wxSurfaceSTLWidget *_wxmaracassurfaceSTLwidget; wxMaracasMPR *_wxMaracasMPR; wxMaracasProcessingCT *_wxMaracasProcessingCT; wxMaracasEmptyPanel *_wxMaracasEmptyPanel; wxMaracasEmptyPanel_2 *_wxMaracasEmptyPanel_2; wxPanel* _actual_panel; wxGauge* _progressGauge; marInterface* _mar; marInterfaceCT* _marCT; DECLARE_EVENT_TABLE( ); void DeletePanels(); }; static const long TOOLBAR_STYLE = wxNO_BORDER | wxTB_FLAT | wxTB_DOCKABLE | wxTB_HORIZONTAL; enum { //! Toolbar & menu buttons ID_TOOLBAR = 200, ID_TOOLBAR_DATA_BROWSER, ID_TOOLBAR_PARAMETERS, ID_TOOLBAR_IMAGE_BROWSER, ID_TOOLBAR_3D_BROWSER, ID_TOOLBAR_PLANS, ID_TOOLBAR_QUANT, ID_TOOLBAR_MPR, ID_TOOLBAR_PROCESSING_CT, ID_TOOLBAR_QUANTIFICATION_CT, ID_TOOLBAR_EMPTY_PANEL, ID_TOOLBAR_EMPTY_PANEL_2, ID_TOOLBAR_ROTATE, ID_TOOLBAR_BRIGHT, ID_TOOLBAR_PAN, ID_TOOLBAR_ZOOM, ID_TOOLBAR_CLEAR, ID_TOOLBAR_INTENSITY, ID_TOOLBAR_HELP, ID_TOOLBAR_STL, }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasNoteBookPatientLstVoi: public wxPanel { public: wxMaracasNoteBookPatientLstVoi(wxWindow *parent); ~wxMaracasNoteBookPatientLstVoi(); void OnChangePageToVOI(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); void OnSelectPatientStudySerieImage(wxCommandEvent& event); void OnReadWriteConf_Maracas(wxCommandEvent& event); void SetMarInterface(marInterface *mar); wxMaracasImageBrowser02* GetWxMaracasImageBrowser02(); wxILPD *GetWxILPD(); void OnPersistence_Read(wxCommandEvent& event); void OnPersistence_Write(wxCommandEvent& event); void Persistence_Read_Images(); void Persistence_Read_VOI(); void Persistence_Write_Images_Database(); void Persistence_Write_Images_ManualReadFileList(); void Persistence_Write_VOI(); string GetRWCM_namefileVOI(); wxNotebook *GetNoteBook(); DECLARE_EVENT_TABLE(); private: //EED 4 oct 2006 marRAWFiles *_marRAWFiles; marRAW2Files *_marRAW2Files; marRAW2AsciiFiles *_marRAW2AsciiFiles; marGdcmDicomILPD *_marGdcmDicomILPD; // EED 14 Nov 2006 wxReadWriteConf *_wxreadwriteconf; // EED 26 Nov 2006 string _RWCM_namefileReadImages; string _RWCM_namefileVOI; marInterface *_mar; marInterface *_mar2; wxNotebook *_noteBook; string _backStringFirstFile; string _backStringFirstFile2; int _voiBack[ 6 ]; wxILPD *_wxILPD; wxMaracasImageBrowser02 *_wxMaracasImageBrowser02; wxMaracasMPR *_wxMaracasMPR; wxListView *_dicomPanelListView; wxWidgetMesure2D *_widgetMesure; //EED 15Avril2008 wxVtk2DBaseView *_wxvtk2Dbaseview; //EED 15Avril2008 vtkBaseData *_vtkbasedata; //EED 15Avril2008 wxPanel *_panelImage; //EED 15Avril2008 wxSplitterWindow *_pnlSplitter_ViewImage_wxILPD; //EED 15Avril2008 wxSplitterWindow *_pnlSplitter_Image_DicomList; //EED 15Avril2008 void SetItem( wxListView *wxlistview, int line, int col, wxString text ) ; //EED 15Avril2008 void ResetwxListView(); //EED 15Avril2008 void SelectedPatient(); //EED 15Avril2008 void SelectedSerie(); //EED 15Avril2008 void SelectedImage(); //EED 15Avril2008 void ShowDicomInformation(string *fileImageName); //EED 15Avril2008 void ShowDicomImage(string *fileImageName); void CreateMPRPanel(); }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasNoteBookIRMQuantification: public wxPanel { public: wxMaracasNoteBookIRMQuantification(wxWindow *parent, marInterface *mar); ~wxMaracasNoteBookIRMQuantification(); void OnChangePageQuantification(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); void OnNewAxis(wxCommandEvent &WXUNUSED(event)); void OnDeleteAxis(wxCommandEvent &WXUNUSED(event)); void OnQuantification(wxCommandEvent & event); DECLARE_EVENT_TABLE(); private: bool _existAxis; marInterface *_mar; wxMaracas3DBrowser *_wxmaracas3dbrowser; wxMaracasQuantification *_wxmaracasquantification; wxNotebook *_noteBook; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasNoteBookCTQuantification: public wxPanel { public: wxMaracasNoteBookCTQuantification(wxWindow *parent, marInterface *mar, string _namefileParentRWCM); ~wxMaracasNoteBookCTQuantification(); void OnChangePageQuantification(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); void OnQuantification(wxCommandEvent& event); void OnReadWriteConf_Maracas(wxCommandEvent& event); void OnPersistence_Read(wxCommandEvent& event); void OnPersistence_Write(wxCommandEvent& event); void Persistence_Read_MPR(); void Persistence_Read_ProcessingCT(); void Persistence_Read_ContourQauntificationCT(); void Persistence_Write_MPR(); void Persistence_Write_ProcessingCT(); void Persistence_Write_ContourQuantificationCT(); DECLARE_EVENT_TABLE(); private: string _namefileParentRWCM; string _RWCM_namefileMPR; string _RWCM_namefileProcessingCT; string _RWCM_namefileContourQuantificationCT; wxReadWriteConf *_wxreadwriteconf; bool _readyQuantification; marInterfaceCT *_mar; wxMaracasMPR *_wxMaracasMPR; wxMaracasProcessingCT *_wxMaracasProcessingCT; wxMaracasQuantificationCT *_wxmaracasquantification_ct; wxNotebook *_noteBook; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasNoteBookVascularTreeExtraction: public wxPanel { public: wxMaracasNoteBookVascularTreeExtraction(wxWindow *parent, marInterface *mar); ~wxMaracasNoteBookVascularTreeExtraction(); void OnChangePageQuantification(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); DECLARE_EVENT_TABLE(); private: marInterface *_mar; wxMaracasEmptyPanel_2 *_wxMaracasEmptyPanel_2; wxMaracasPathology_01 *_wxMaracasPathology_01; wxNotebook *_noteBook; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasNoteBookSTLFormat: public wxPanel { public: wxMaracasNoteBookSTLFormat(wxWindow *parent, marInterface *mar); ~wxMaracasNoteBookSTLFormat(); void OnChangePageSTLFormat(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); void OnNewAxis(wxCommandEvent &WXUNUSED(event)); void OnDeleteAxis(wxCommandEvent &WXUNUSED(event)); wxPanel *CreateSTLFormat_01(wxWindow *parent,marInterface *mar); wxPanel *CreateSTLFormat_02(wxWindow *parent,marInterface *mar); wxPanel *CreateSTLFormat_03(wxWindow *parent,marInterface *mar); DECLARE_EVENT_TABLE(); private: // STL 01 bool _existAxis; marInterface *_mar; wxMaracas3DBrowser *_wxmaracas3dbrowser; wxSurfaceSTLWidget *_wxmaracassurfaceSTLwidget; wxNotebook *_noteBook_01; // STL 02 wxMaracasMPR *_wxMaracasMPR; // General wxNotebook *_noteBook_general; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasNoteBookTests: public wxPanel { public: wxMaracasNoteBookTests(wxWindow *parent, marInterface *mar); ~wxMaracasNoteBookTests(); void OnChangePageTests(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); DECLARE_EVENT_TABLE(); private: marInterface *_mar; wxMaracasEmptyPanel_3 *_wxMaracasEmptyPanel_3; wxMaracasEmptyPanel_4 *_wxMaracasEmptyPanel_4; wxMaracas_ManualContour_Panel *_wxmanualcontourpanel; wxMaracas_ManualTree_MPR *_wxMaracas_ManualTree_MPR; wxMaracas_ManualSegmentation_MPR *_wxMaracas_ManualSegmentation_MPR; wxMaracas_SegmentationFM3D *_wxMaracas_SegmentationFM3D; wxNotebook *_noteBook; }; class wxMaracasNoteBookManualRegistration: public wxPanel { public: wxMaracasNoteBookManualRegistration(wxWindow *parent, marInterface *mar); ~wxMaracasNoteBookManualRegistration(); void OnChangePageTests(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); bool GetIfSecondVolumeExist(); void GenerateSecondVolume(marInterface *mar); DECLARE_EVENT_TABLE(); private: marInterface *_mar; marInterface *_marB; wxNotebook *_noteBook; wxManualRegistration3D *_wxmanualregistration3D; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxMaracasGenericChiFra: public wxMDIChildFrame { public: wxMaracasGenericChiFra(wxMDIParentFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style); ~wxMaracasGenericChiFra(); void OnClose(wxCloseEvent& event); void SetBlockCloseEvent(bool blockClose); DECLARE_EVENT_TABLE(); private: bool _blockClose; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxProcessingImagesControl: public wxPanel { public: wxProcessingImagesControl(wxWindow *parent); void OnActiveIRMQuantificationFrame(wxCommandEvent& event); void OnActiveCTQuantificationFrame(wxCommandEvent& event); void OnActiveVascularTreeExtractionFrame(wxCommandEvent& event); void OnActiveSTLFormatFrame(wxCommandEvent& event); void OnActiveTestsFrame(wxCommandEvent& event); void OnActiveTests2Frame(wxCommandEvent& event); ~wxProcessingImagesControl(); private: }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class wxProcessingImagesTabControl: public wxPanel { public: wxProcessingImagesTabControl(wxWindow *parent,marInterface *mar,wxMaracasNoteBookPatientLstVoi *patientlstvoi); ~wxProcessingImagesTabControl(); void OnChangingPage(wxNotebookEvent& event); void OnChangePage(wxNotebookEvent& event); private: marInterface *_mar; wxMaracasNoteBookPatientLstVoi *_patientlstvoi; wxMaracasNoteBookIRMQuantification *_irmQuantification; wxMaracasNoteBookCTQuantification *_ctQuantification; wxMaracasNoteBookVascularTreeExtraction *_vascularTreeExtraction; wxMaracasNoteBookSTLFormat *_stlFormat; wxNotebook *_noteBook; }; //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- class MAR_INTERFACEWX_EXPORT wxMaracasFrame03: public wxMDIParentFrame { public: wxMaracasFrame03( wxFrame *parent, wxWindowID id = -1, marInterface* mar = NULL, char *dictionaryFileName=NULL, const wxString& title = wxT("MARACAS: MAgnetic Resonance Angiography Computer ASsisted analysis"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE); ~wxMaracasFrame03(); void OnActivePatientListVoiFrame(wxCommandEvent& event); void OnActiveProcessingFrame(wxCommandEvent& event); void OnActiveParams(wxCommandEvent& event); void OnActiveAbout(wxCommandEvent& event); void OnActiveProcessingModules(wxCommandEvent& event); void OnActiveIRMQuantificationFrame(wxCommandEvent& event); void OnActiveCTQuantificationFrame(wxCommandEvent& event); void OnActiveVascularTreeExtractionFrame(wxCommandEvent& event); void OnActiveSTLFormatFrame(wxCommandEvent& event); void OnActiveTestsFrame(wxCommandEvent& event); void OnActiveTests2Frame(wxCommandEvent& event); void OnActiveQuit(wxCommandEvent& event); void CreateWindowMDI( int type ); void Configure_WindowMDI( int type ); void eventMenuDeleteAllPatientInDB(wxCommandEvent& event); void eventMenuDeletePatientInDB(wxCommandEvent& event); void OnFilterInDB(wxCommandEvent& event); void OnOrderingInDB(wxCommandEvent& event); void OnEditColumnsInDB(wxCommandEvent& event); DECLARE_EVENT_TABLE(); private: marInterface *_mar; // wxMaracasGenericChiFra *_frame_ListPatieint_Voi; wxFrame *_frame_ListPatieint_Voi; wxMaracasNoteBookPatientLstVoi *_patientlstvoi; wxMaracasNoteBookManualRegistration *_manualRegistrationPanel; wxBitmapButton *_btnProcessingData; wxBitmapButton *_btnCTQuant; wxBitmapButton *_btnIRMQuant; wxBitmapButton *_btnTreeExtrac; wxBitmapButton *_btnSTLFormat; wxMenu *_option_menu; wxMenuBar *CreateMenuBarBase(); void InitToolBar(wxToolBar* toolBar); }; // menu items ids enum { MDI_QUIT = 100, MDI_NEW_WINDOW, MDI_REFRESH, MDI_CHANGE_TITLE, MDI_CHANGE_POSITION, MDI_CHANGE_SIZE, MDI_CHILD_QUIT, MDI_PARAMETERS, MDI_ABOUT }; #endif // __WX__MARACAS__FRAME02__HXX__