//------------------------------------------------------------------------------------------------------------
#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 "contour/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"
#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
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<vtkImageData*> images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER);
~wxContourMainFrame();
void createInstantChooserPanel(wxWindow * parent);
void createViewPanel(wxWindow * parent);
-
- void setViewPanel( wxContourViewPanel * theViewPanel );
void setInstantChooserPanel( wxInstantChooserPanel * theInstantChooserPanel );
//------------------------------------------------------------------------------------------------------------
// Attributes getters and setters
//------------------------------------------------------------------------------------------------------------
-
+ static wxContourMainFrame* getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> 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<vtkImageData*>
+ */
+ std::vector<vtkImageData*> 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<std::string> 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<int> &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<int>& tempVector);
+
+ std::vector<std::string> 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);
private:
//------------------------------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------------------------------
// Attributtes
//------------------------------------------------------------------------------------------------------------
+ static wxContourMainFrame* instance;
+
+ KernelManagerContour* kernelManager;
+
+ wxContourViewPanel* _theViewPanel;
+
wxAuiManager m_mgr;
/*
*/
long m_notebook_style;
long m_notebook_theme;
+ int _numberOfVariablesStatistics;
- wxContourViewPanel * _theViewPanel;
-
- OutlineModelManager * _modelManager;
+ //OutlineModelManager * _modelManager;
wxInstantChooserPanel * _instantPanel;
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;
};