+}
+void wxContourMainFrame::ShowToolsPanel(bool show){
+ _pannew->Show(show);
+}
+
+
+
+void wxContourMainFrame::SetContourGroup(int contourGroup)
+{
+ _contourGroup = contourGroup;
+}
+
+
+wxPanel *wxContourMainFrame::getMaskImageViewPanel(wxWindow *parent)
+{
+
+ if (_viewMaskImagePanel==NULL)
+ {
+ _contourextractdata = new ContourExtractData(true);
+ _contourextractdata->SetImage( _theViewPanel->getImageData() );
+
+// double range[2];
+// _theViewPanel->getImageData()->GetScalarRange(range);
+ //int min = (int)floor (range[0]);
+ //int max = (int)ceil (range[1]);
+ int min = 254;
+ int max = 256;
+
+ _viewMaskImagePanel = new ThresholdImageViewPanel( parent, -1, -1 , 0);
+ _viewMaskImage = new ThresholdImageView();
+ _viewMaskImage->SetImage(_contourextractdata->GetVtkImageMaskResult() );
+ _viewMaskImage->SetminMaxValue( min, max);
+ _viewMaskImage->SetBaseColor( 0,0,1 );
+ _viewMaskImagePanel->SetThresholdImageView( _viewMaskImage );
+ _viewMaskImage->SetwxVtkBaseView( _theViewPanel->getWxVtkBaseView() );
+
+ }
+ return _viewMaskImagePanel;
+}
+
+wxPanel *wxContourMainFrame::getThresholdImageViewPanel(wxWindow *parent)
+{
+ if (_viewThresholdImagePanel==NULL)
+ {
+ double range[2];
+ _theViewPanel->getImageData()->GetScalarRange(range);
+ int min = (int)floor (range[0]);
+ int max = (int)ceil (range[1]);
+ _viewThresholdImagePanel = 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() );
+ }
+ return _viewThresholdImagePanel;
+}
+
+//CMRU 17-08-09-----------------------------------------------------------------------------------------------
+int wxContourMainFrame::getType ()
+{
+ int tipo = 0;
+ std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
+
+ if(!currentSelection.empty())
+ {
+ std::string cloneName = currentSelection [0];
+ manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);
+ tipo = manualModel-> GetTypeModel();
+ }
+ return tipo;
+}
+
+double wxContourMainFrame::getContourSizeInPixels()
+{
+ double contourSize = 0;
+
+ std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects(); if(!currentSelection.empty())
+ if(!currentSelection.empty())
+ {
+ std::string cloneName = currentSelection [0];
+
+ manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);//_modelManager->getOutlineByKeyName( cloneName )->getModel();
+ contourSize = manualModel-> GetPathSize();
+ }
+ return contourSize;
+}
+manualBaseModel * wxContourMainFrame::getContour ()
+{
+ std::vector<std::string> currentSelection = _theViewPanel->getSelectedObjects();
+
+ if(!currentSelection.empty())
+ {
+ std::string cloneName = currentSelection [0];
+ manualBaseModel * manualModel = kernelManager->getOutlineByKeyName(cloneName);//_modelManager->getOutlineByKeyName( cloneName )->getModel();
+ return manualModel;
+ }
+ return NULL;
+}
+void wxContourMainFrame::onPrintLabel (wxString label, manualBaseModel* manualModel)
+{
+ std::string labelAscii(label.ToAscii());
+ int pos = labelAscii.find(" ");
+
+ int j;
+
+ for (j=0 ; pos != string::npos;j++)
+ {
+ labelAscii.replace( pos, 1, "_" );
+ pos= labelAscii.find(" ");
+ }
+
+ manualModel -> SetLabel(labelAscii);
+}
+void wxContourMainFrame::onInsertCalculation(manualBaseModel* manualModel)
+{
+ double sizeInPixel = manualModel ->GetPathSize();
+ double onePixelRealSize = interfMainPanel::getInstance()->GetPixelValue();;
+ double realContourSize = sizeInPixel*onePixelRealSize;
+ manualModel ->SetRealSize(realContourSize);
+}
+
+double wxContourMainFrame::onePixelSize( double value)
+{
+ return _onePixelSize = value;
+}
+
+std::string wxContourMainFrame::GetFileLocation()
+{
+ return _fileLocation;
+}
+
+void wxContourMainFrame::SetFileLocation(std::string newFileLocation)
+{
+ _fileLocation = newFileLocation;
+ std::cout<<"GETFILELOCATION:"<<_fileLocation<<std::endl;
+}
+//------------------------------------------------------------------------------------------------------------
\ No newline at end of file