From d20aa4c87071dd7795678e7716c6f8ba248cebc1 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Wed, 15 Apr 2009 10:21:26 +0000 Subject: [PATCH] use wx2std --- .../wxContourMainFrame.cxx | 18 +++++++++--------- .../wxInstantChooserPanel.cxx | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 43b374f..3070d42 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -1025,23 +1025,23 @@ void wxContourMainFrame::SegmentationOneSliceITK(int x, int y, int z, wxString d InternalImageType, InternalImageType > ZeroCrossingFilterType; ZeroCrossingFilterType::Pointer zeroCrossing = - ZeroCrossingFilterType::New(); + ZeroCrossingFilterType::New(); -const double propagationScaling = atof( prop ); +const double propagationScaling = atof( crea::wx2std(prop).c_str() ); geodesicActiveContour->SetPropagationScaling( propagationScaling ); geodesicActiveContour->SetCurvatureScaling( 1.0 ); geodesicActiveContour->SetAdvectionScaling( 1.0 ); geodesicActiveContour->SetMaximumRMSError( 0.02 ); - int it=atoi( iter ); + int it=atoi( crea::wx2std(iter).c_str() ); geodesicActiveContour->SetNumberOfIterations( it ); smoothing->SetInput( filter2->GetOutput() ); gradientMagnitude->SetInput( smoothing->GetOutput() ); sigmoid->SetInput( gradientMagnitude->GetOutput() ); fastMarching->SetInput( sigmoid->GetOutput() ); - geodesicActiveContour->SetInput( fastMarching->GetOutput() ); + geodesicActiveContour->SetInput( fastMarching->GetOutput() ); geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() ); zeroCrossing->SetInput( geodesicActiveContour->GetOutput() ); @@ -1055,11 +1055,11 @@ const double propagationScaling = atof( prop ); smoothing->SetConductanceParameter( 9.0 ); - const double sigma = atof( sigm ); + const double sigma = atof( crea::wx2std(sigm).c_str() ); gradientMagnitude->SetSigma( sigma ); - const double alpha = atof( alf ); - const double beta = atof( bet ); + const double alpha = atof( crea::wx2std(alf).c_str() ); + const double beta = atof( crea::wx2std(bet).c_str() ); sigmoid->SetAlpha( alpha ); sigmoid->SetBeta( beta ); @@ -1073,7 +1073,7 @@ const double propagationScaling = atof( prop ); seedPosition[0] = x; seedPosition[1] = y; - const double initialDistance = atof( distanc ); + const double initialDistance = atof( crea::wx2std(distanc).c_str() ); NodeType node; @@ -1085,7 +1085,7 @@ const double propagationScaling = atof( prop ); seeds->Initialize(); seeds->InsertElement( 0, node ); - fastMarching->SetTrialPoints( seeds ); + fastMarching->SetTrialPoints( seeds ); fastMarching->SetSpeedConstant( 1.0 ); diff --git a/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx b/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx index cd697ef..0bc1fed 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxInstantChooserPanel.cxx @@ -498,4 +498,5 @@ DEFINE_EVENT_TYPE( wxINSTANT_CHOOSER_CHANGE ) addConcept( conceptNameVect[i], 1, conceptSizeVect[i], 1); } // if } - } \ No newline at end of file + } + -- 2.45.1