X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FInterface_ManagerContour_NDimensions%2FwxContourMainFrame.h;h=50a923f57617e374d6abc233c90aa39ecef1d8bc;hb=5757258860acae97fa0f3449ef1354c87052d213;hp=04969ffa281375eb1e19ad06e21d66fe80412089;hpb=192dfdf774a06066eff90e9c50916723c8592706;p=creaContours.git diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h index 04969ff..50a923f 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.h @@ -21,22 +21,43 @@ //------------------------------------------------------------------------------------------------------------ #include "wx/aui/aui.h" -#include "ContourThing.h" -#include "AxeThing.h" -#include "ImageSourceThing.h" -#include "ImageSectionThing.h" -#include "InstantMembersNameList.h" -#include "OutlineGroup.h" +#include "interfMainPanel.h" + +#include "wxVtkBaseView_SceneManager.h" +#include "wxInstantChooserPanel.h" +#include "wxContourViewPanel.h" + +#include "KernelManagerContour.h" + +#include "ContourWorkspace.h" +#include "ContourExtractData.h" + + + + +#include "PerformingOperation.h" + + + +//#include "ContourThing.h" +//#include "AxeThing.h" +//#include "ImageSourceThing.h" +//#include "ImageSectionThing.h" +//#include "InstantMembersNameList.h" +//#include "OutlineGroup.h" #include "SomeEnvironment.h" #include "ContourWorkspace.h" #include "ContourWrap_ViewControl.h" #include "Instant.h" +#include "PerformingOperation.h" + +#include "ContourThing.h" + +//#include "OutlineModelManager.h" -#include "OutlineModelManager.h" -#include "wxInstantChooserPanel.h" #include "wxContour_ButtonsBar.h" #include "wxContour_ControlPanel.h" -#include "wxContourViewPanel.h" + #include "wxContour_Grid.h" #include "wxContour_DrawToolsPanel.h" #include "wxContour_OperationsToolsPanel.h" @@ -45,7 +66,16 @@ #include "wxContour_EdtionToolsPanel.h" #include "wxContour_ListViewPanel.h" -#include "wxVtkBaseView_SceneManager.h" + + + +#include "vtkContourFilter.h" +#include "vtkPolyDataConnectivityFilter.h" +#include "vtkCleanPolyData.h" +#include "vtkImageReslice.h" +#include "vtkMetaImageWriter.h" +#include "vtkImageData.h" +#include "vtkMetaImageReader.h" //------------------------------------------------------------------------------------------------------------ // Events declaration @@ -71,6 +101,7 @@ class wxContourMainFrame : public wxPanel { wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER); + wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER); ~wxContourMainFrame(); @@ -90,8 +121,6 @@ class wxContourMainFrame : public wxPanel { void createInstantChooserPanel(wxWindow * parent); void createViewPanel(wxWindow * parent); - - void setViewPanel( wxContourViewPanel * theViewPanel ); void setInstantChooserPanel( wxInstantChooserPanel * theInstantChooserPanel ); @@ -125,12 +154,111 @@ class wxContourMainFrame : public wxPanel { //------------------------------------------------------------------------------------------------------------ // Attributes getters and setters //------------------------------------------------------------------------------------------------------------ - + static wxContourMainFrame* getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER); + static wxContourMainFrame* getInstance(); //------------------------------------------------------------------------------------------------------------ // Other functional methods //------------------------------------------------------------------------------------------------------------ + /* + ** This method returns the vector of images selected by the user + ** return value std::vector + */ + std::vector getVectImages(); + + /** + ** This methods connect the event in the class interfMainPanel with the world of the appli + **/ + void onCreateContourSpline( ); + void onCreateContourRectangle( ); + void onCreateContourCircle( ); + void onCreateContourBullEye(wxPanel* pan); + ///////////////////////////////// + void onDeleteContour(); + void deleteContours( std::vector keyNamesVector ); + void deleteContour( std::string theKeyName ); + void onDeleteContoursActSlice(); + void onDeleteAllContours(); + void deleteAllContours(); + void setConceptValue( std::string name, int value ); + ConceptDataWrap* getLastConceptData(); + bool getIfConceptCheckedAt( std::string name, int pos ); + + void changeInstant(); + + int getNamesWrappingSize(); + + std::string getNameWrapping(int i); + + + void updateInstantOutlines(); + void updateInstantImageData(); + void updateInstantAxes(); + + void onChangeDeep(int val); + +/////////////////////////// + void onCopy(); + void onPaste(); + void onUndo(); + void onRedo(); + void createCopyContourOf ( std::string anExistingKName, std::vector &instantNoTouchData, bool append ); +///////////////////////7 + void onLoad(); + void onSave(); + + void openContours( FILE *pFile, bool staticContour ); + + void RefreshInterface(); + + vtkImageData* getImageData(); + + void onSegmentationOneSlice(int isovalue,int sampling,int method); + + void SegmentationOneSlice( int x, int y, int z, int isovalue, int sampling, int method ); + + int GetImageDataSizeZ(); + + void GetImageDataRange(double *range); + + void onSegmentationAllSlice(int minZ,int maxZ,int isovalue,int sampling,int method); + void showAxis(bool show); + + void onRigidPressed(); + + void onWidthOfContour(double width); + + int getColorWindow(); + int getWindowLevel(); + + void onBrigthnessColorWindowLevel(int colorwindow,int windowlevel); + + void onInterpolation(bool interpolate); + + void onChangeInstant(std::string name,int actual); + + void resetAppend(); + + void onSpreadAdd(); + + void onSpreadGo(int type); + + void getInstantVector(std::vector& tempVector); + + std::vector getOutlinesName(int slide); + + void onInformationContourLabels(int typeContourGroup,int selection,int minimumZ,int maximumZ); + + void onSaveResults(std::string directory,std::string namefile, std::string filename, int typeContourGroup); + + void SaveValuesXYZ(std::string directory,std::string namefile, int typeContourGroup); + + void SaveImageResult(std::string directory,std::string namefile, int typeContourGroup); + + void onChangeInstantInstantPanel(std::string name,int value, int minshow, int maxshow); + + void onSnakePressed(); private: //------------------------------------------------------------------------------------------------------------ // Private methods @@ -140,6 +268,12 @@ private: //------------------------------------------------------------------------------------------------------------ // Attributtes //------------------------------------------------------------------------------------------------------------ + static wxContourMainFrame* instance; + + KernelManagerContour* kernelManager; + + wxContourViewPanel* _theViewPanel; + wxAuiManager m_mgr; /* @@ -148,10 +282,9 @@ private: */ long m_notebook_style; long m_notebook_theme; + int _numberOfVariablesStatistics; - wxContourViewPanel * _theViewPanel; - - OutlineModelManager * _modelManager; + //OutlineModelManager * _modelManager; wxInstantChooserPanel * _instantPanel; @@ -173,12 +306,38 @@ private: wxVtkBaseView_SceneManager * _sceneManager; - Instant * _actualInstant; + //Instant * _actualInstant; + + /*DECLARE_CLASS(wxContourMainFrame) // any class wishing to process wxWindows events must use this macro DECLARE_EVENT_TABLE()*/ bool _creatingContoursActive; +////////JCP 21 - 11 - 08 + void createContour( int typeContour ); + + //manualContourModel * factoryManualContourModel(int typeContour); + + manualContourModel * factoryManualContourModel(wxPanel* panel); + + + + void saveState(); + void loadState(std::string filename); + + void saveFileWithContours( std::string filename ); + + int inredo; + int inundo; + std::string stundoredo; + + + + //wxContourViewPanel* _viewPan; + PerformingOperation* _performingOperation; + + static char COPY; };