colorImageLayerPanel->SetSizer(flexsizer, true);
colorImageLayerPanel->SetAutoLayout( true );
//configPanel->SetEventHandler(this->contourevent);
- wxPanel *panel = wxContourMainFrame::getInstance()->getThresholdImageViewPanel( colorImageLayerPanel );
+ wxPanel *panel = wxContourMainFrame::getInstance()->getColorLayerImageViewPanel( colorImageLayerPanel );
wxStaticText* stattext = new wxStaticText(colorImageLayerPanel, -1, wxString(_T(" Color Image Layer ")), wxDefaultPosition,
wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
thresholdPanel->SetSizer(flexsizer, true);
thresholdPanel->SetAutoLayout( true );
//configPanel->SetEventHandler(this->contourevent);
- wxPanel *panel = wxContourMainFrame::getInstance()->getColorLayerImageViewPanel( thresholdPanel );
+ wxPanel *panel = wxContourMainFrame::getInstance()->getThresholdImageViewPanel( thresholdPanel );
wxStaticText* stattext = new wxStaticText(thresholdPanel, -1, wxString(_T(" Threshold segmentation ")), wxDefaultPosition,
wxDefaultSize, wxALIGN_CENTRE|wxBORDER_SIMPLE|wxFULL_REPAINT_ON_RESIZE, wxString(_T("")));
flexsizer->Add(stattext,wxALIGN_CENTER | wxALIGN_CENTRE);
_viewMaskImagePanel = NULL;
_viewThresholdImage = NULL;
_viewThresholdImagePanel = NULL;
-
+ _viewColorLayerImage = NULL;
+ _viewColorLayerImagePanel = NULL;
}
wxContourMainFrame :: wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style,std::string datadir)
_viewMaskImagePanel = NULL;
_viewThresholdImage = NULL;
_viewThresholdImagePanel = NULL;
+ _viewColorLayerImage = NULL;
+ _viewColorLayerImagePanel = NULL;
// set up default notebook style
m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
_viewThresholdImage->onThreshold();
}
}
-
+
+ // Refresh Threshold image
+ if(_viewColorLayerImage!=NULL){
+ _viewColorLayerImage->SetZ(actualSlice);
+ if (_viewColorLayerImagePanel->IsVisible()==true){
+ _viewColorLayerImage->onThreshold();
+ }
+ }
+
updateInstantOutlines();
updateInstantImageData();
updateInstantAxes();
{
if (_viewColorLayerImagePanel==NULL)
{
- _viewColorLayerImagePanel = new wxPanel(parent, -1);
-/*EED Borrame
double range[2];
_theViewPanel->getImageData()->GetScalarRange(range);
int min = (int)floor (range[0]);
int max = (int)ceil (range[1]);
- _viewColorLayerImagePanel = new ThresholdImageViewPanel( parent, min, max , 1);
- _viewThresholdImage = new ThresholdImageView();
- _viewThresholdImage->SetImage( _theViewPanel->getImageData() );
- _viewThresholdImage->SetminMaxValue( min, max);
- _viewThresholdImage->SetBaseColor( 1,0,0 );
- _viewThresholdImagePanel->SetThresholdImageView( _viewThresholdImage );
- _viewThresholdImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
-*/
+ _viewColorLayerImagePanel = new ColorLayerImageViewPanel( parent, min, max , 1);
+ _viewColorLayerImage = new ColorLayerImageView();
+ _viewColorLayerImage->SetImage( _theViewPanel->getImageData() );
+ _viewColorLayerImagePanel->SetColorLayerImageView( _viewColorLayerImage );
+ _viewColorLayerImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
}
return _viewColorLayerImagePanel;
}
#include "ThresholdImageView.h"
#include "ThresholdImageViewPanel.h"
-//EED #include "ColorLayerImageView.h"
-//EED #include "ColorLayerImageViewPanel.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 "wxContour_ButtonsBar.h"
-//#include "wxContour_ControlPanel.h"
-
-//#include "wxContour_Grid.h"
-//#include "wxContour_DrawToolsPanel.h"
-//#include "wxContour_OperationsToolsPanel.h"
-//#include "wxContour_AutomaticFormsToolsPanel.h"
-//#include "wxContour_StandardToolsPanel.h"
-//#include "wxContour_EdtionToolsPanel.h"
-//#include "wxContour_ListViewPanel.h"
+#include "ColorLayerImageView.h"
+#include "ColorLayerImageViewPanel.h"
//ITK
void ShowToolsPanel(bool show);
-// void setButtonsBar( wxContour_ButtonsBar * theButtonsBar );
-// void setGrid( wxContour_Grid * theGridPanel );
-// void setDrawToolsPanel( wxContour_DrawToolsPanel * theDrawToolsPanel );
-// void setOperationsToolsPanel( wxContour_OperationsToolsPanel * theDrawToolsPanel );
-// void setAutomaticFormsPanel( wxContour_AutomaticFormsToolsPanel * theAutoFormsPanel );
-// void setStandardToolsPanel( wxContour_StandardToolsPanel * theStandardToolsPanel );
-// void setEditionToolsPanel( wxContour_EdtionToolsPanel * theEditionToolsPanel );
-// void setListViewPanel( wxContour_ListViewPanel * theListViewPanel );
-
-
////------------------------------------------------------------------------------------------------------------
//// Methods for capturing events
////------------------------------------------------------------------------------------------------------------
//====================================================================================================
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);
//
// @param typeContourGroup - int The operation id (AND,OR,XOR,ALL=3)
//
void onInformationContourLabels(int typeContourGroup,int selection,int minimumZ,int maximumZ,int grayRangeMin, int grayRangeMax);
-
void onSaveResults(std::string directory,std::string namefile, std::string filename,
int typeContourGroup, int selection, int minZ, int maxZ, bool XYZValues, bool contourImage, bool statistics);
-
void SaveValuesXYZ(std::string directory,std::string namefile, int typeContourGroup);
-
-
-
void onChangeInstantInstantPanel(std::string name,int value, int minshow, int maxshow);
-
void onSnakePressed();
-
void saveFileWithContoursAutomatique();
-
void ShowResultImages(int typeContourGroup, int selection, int minZ, int maxZ );
-
wxPanel *getMaskImageViewPanel(wxWindow *parent);
void SetContourGroup(int contourGroup);
wxPanel *getThresholdImageViewPanel(wxWindow *parent);
//------------------------------------------------------------------------------------------------------------
int _contourGroup;
-
static wxContourMainFrame* instance;
-
KernelManagerContour* kernelManager;
-
interfMainPanel* _pannew;
-
PerformingOperation* _performingOperation;
-
std::string _datadir;
-
wxContourViewPanel* _theViewPanel;
-
wxInstantChooserPanel * _instantPanel;
//AD: 03-09: This attributes represents the reference line that is going to be used for the mirroring
manualContourModelLine * _refLineModel;
manualViewLine * _refLineView;
-
-
wxAuiManager m_mgr;
wxAuiNotebook * notebook;
-
long m_notebook_style;
long m_notebook_theme;
int _numberOfVariablesStatistics;
-
// Contour Image Mask
ThresholdImageView *_viewMaskImage;
ThresholdImageViewPanel *_viewMaskImagePanel;
ThresholdImageViewPanel *_viewThresholdImagePanel;
// Color Layer Image
-//EED ColorLayerImageView *_viewColorLayerImage;
-//EED ColorLayerImageViewPanel *_viewColorLayerImagePanel;
- wxPanel *_viewColorLayerImagePanel;
-
+ ColorLayerImageView *_viewColorLayerImage;
+ ColorLayerImageViewPanel *_viewColorLayerImagePanel;
std::vector<vtkImageData*> _images;
-
bool _actorPresent;
-
-
-
-
/*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);
-
manualBaseModel * factoryManualContourModel(wxPanel* panel);
-
ContourExtractData *_contourextractdata;
-
void saveState();
void loadState(std::string filename);
void loadContours( FILE *pFile, bool staticContour );
-
void saveFileWithContours( std::string filename );
void onLoadContours(std::string fileNameContourROI);
int inredo;
int inundo;
std::string stundoredo;
-
-
static char COPY;
//CMRU 17-08-09-----------------------------------------------------------------------------------------------