#ifndef _wx_VtkDICOMImporterPage2_h_ #define _wx_VtkDICOMImporterPage2_h_ // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif // for all others, include the necessary headers #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wx/wizard.h" #include "wx/treectrl.h" #include #include #include class wxVTKRenderWindowInteractor; class vtkViewImage2D; class wxVtkDICOMImporterPage2; /** \class DICOMVolumeItemData wxVtkDICOMImporterPage2.h "wxVtkDICOMImporterPage2.h" \brief see wxVtkDICOMImporter \author Nicolas Toussaint */ class DICOMVolumeItemData: public wxTreeItemData { public: DICOMVolumeItemData() { this->DICOMVolume = NULL; } void SetDICOMVolume (itk::DICOMVolume::Pointer gdcm_v) { this->DICOMVolume = gdcm_v; } itk::DICOMVolume::Pointer GetDICOMVolume (void) const { return this->DICOMVolume; } private: itk::DICOMVolume::Pointer DICOMVolume; }; class wxNavigationThread: public wxThread { public: wxNavigationThread(itk::DICOMVolume::Pointer dcmvolume, wxVtkDICOMImporterPage2* frame) //: wxThread(wxTHREAD_JOINABLE) : wxThread() { m_DCMVolume = dcmvolume; m_Frame = frame; } virtual ~wxNavigationThread(){}; virtual void *Entry(); virtual void OnExit(); void Navigate(); protected: private: itk::DICOMVolume::Pointer m_DCMVolume; wxVtkDICOMImporterPage2* m_Frame; }; /** \class DICOMFileItemData wxVtkDICOMImporterPage2.h "wxVtkDICOMImporterPage2.h" \brief see wxVtkDICOMImporter \author Nicolas Toussaint */ class DICOMFileItemData: public wxTreeItemData { public: DICOMFileItemData() { this->Filename = ""; } void SetFilename (std::string filename) { this->Filename = filename; } std::string GetFilename (void) const { return this->Filename; } private: std::string Filename; }; /** \class wxVtkDICOMImporterPage2 wxVtkDICOMImporterPage2.h "wxVtkDICOMImporterPage2.h" \brief see wxVtkDICOMImporter \author Nicolas Toussaint */ class wxVtkDICOMImporterPage2: public wxWizardPageSimple { public: wxVtkDICOMImporterPage2 (wxWizard* parent); virtual ~wxVtkDICOMImporterPage2(); itk::GDCMImporter::Pointer GetImporter (void) { return this->Importer; } enum { BUTTON_OPEN_DIR, BUTTON_DELETE, BUTTON_SPLIT, BUTTON_RESET, BUTTON_SAVEALL, TREECTRL, TREECTRL_MENU_SAVEAS, TREECTRL_MENU_PREVIEW, COMBOSPLIT }; enum StatusIds { STATUS_PLAY, STATUS_STOP }; void OnButtonOpenDir (wxCommandEvent &event); void OnButtonDelete (wxCommandEvent &event); void OnButtonSplit (wxCommandEvent &event); void OnButtonReset (wxCommandEvent &event); void OnButtonSaveAll (wxCommandEvent &event); void OnComboSplit (wxCommandEvent &event); void OnButtonClearAll (wxCommandEvent &event); void OnKeyDown (wxTreeEvent &event); void OnSelectionChanged (wxTreeEvent &event); void OnItemMenu (wxTreeEvent &event); void OnPageChanging (wxWizardEvent &event); void OnTreeCtrlMenuSaveAs (wxCommandEvent& event); void OnTreeCtrlMenuPreview (wxCommandEvent& event); void UpdateTree (void); void UpdateCombo (void); void DeleteSelectedItems(void); void ShowMenu (wxTreeItemId, const wxPoint&); void DeleteCurrentNavigationThread(void); wxStaticText* Text; wxButton* OpenDirButton; wxButton* DeleteButton; wxButton* SplitButton; wxButton* ResetButton; wxButton* SaveAllButton; wxChoice* ComboSplit; wxTreeCtrl* TreeCtrl; wxThread* CurrentNavigationThread; wxVTKRenderWindowInteractor* ViewRWin; vtkViewImage2D* View; protected: DECLARE_EVENT_TABLE() void SetProperties (void); void DoLayout(void); void NavigateInVolume(itk::DICOMVolume::Pointer dcmvolume); private: itk::GDCMImporter::Pointer Importer; StatusIds m_Status; }; #endif