From: Eduardo DAVILA Date: Wed, 5 Jan 2022 10:12:46 +0000 (+0100) Subject: #3381 Clean Code Segmentation VTK X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2324e69fae89eb2cd267c14c087db68e96c9b88b;p=creaContours.git #3381 Clean Code Segmentation VTK --- diff --git a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx index 48c038b..6e93fad 100644 --- a/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx +++ b/lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx @@ -1744,8 +1744,8 @@ void wxContourMainFrame::onSegmentationOneSlice(int isovalue,int sampling,int me void wxContourMainFrame::SegmentationOneSlice( int x, int y, int z, int isovalue, int sampling, int method ) { -printf("EED wxContourMainFrame::SegmentationOneSlice Start=%d %d\n",sampling,method ); -printf("EED wxContourMainFrame::SegmentationOneSlice %d %d %d \n",x,y,z ); +//printf("EED wxContourMainFrame::SegmentationOneSlice Start=%d %d\n",sampling,method ); +//printf("EED wxContourMainFrame::SegmentationOneSlice %d %d %d \n",x,y,z ); int typeofcontour = 1; //--Extracting Contour @@ -1894,39 +1894,32 @@ myfile.close(); std::vector vecCtrlPointY; std::vector vecCtrlPointZ; -printf("EED wxContourMainFrame::SegmentationOneSlice GetNumberOfLines=%d \n",polyDataResult->GetNumberOfLines() ); - -int numberOfPointsInCell; -int numberOfcells=polyDataResult->GetNumberOfCells(); -for (int jj=0; jjGetCell( jj ); - numberOfPointsInCell=vtkcell->GetNumberOfPoints(); - printf("EED wxContourMainFrame::SegmentationOneSlice cell=%d points=%d \n",jj,numberOfPointsInCell ); -}// for jj - -printf("EED wxContourMainFrame::SegmentationOneSlice PrintSelf \n"); - -polyDataResult->PrintSelf( std::cout, vtkIndent(0) ); +//printf("EED wxContourMainFrame::SegmentationOneSlice GetNumberOfLines=%d \n",polyDataResult->GetNumberOfLines() ); +//int numberOfPointsInCell; +//int numberOfcells=polyDataResult->GetNumberOfCells(); +//for (int jj=0; jjGetCell( jj ); +// numberOfPointsInCell=vtkcell->GetNumberOfPoints(); +// printf("EED wxContourMainFrame::SegmentationOneSlice cell=%d points=%d \n",jj,numberOfPointsInCell ); +//}// for jj +// printf("EED wxContourMainFrame::SegmentationOneSlice PrintSelf \n"); +// polyDataResult->PrintSelf( std::cout, vtkIndent(0) ); if (polyDataResult->GetNumberOfCells()>0) { double *p; - printf("EED wxContourMainFrame::SegmentationOneSlice A \n"); vtkCell* vtkcell = polyDataResult->GetCell( 0 ); - printf("EED wxContourMainFrame::SegmentationOneSlice B \n"); // int ii,size=polyDataResult->GetNumberOfPoints(); int ii,size=vtkcell->GetNumberOfPoints(); - printf("EED wxContourMainFrame::SegmentationOneSlice C \n"); int id; for (ii=0;iiGetLines()->GetData()->GetValue(ii); // p = polyDataResult->GetPoint(id); p = vtkcell->GetPoints()->GetPoint(ii); - - printf("EED wxContourMainFrame::SegmentationOneSlice (%d) id=%d px=%f py=%f\n",ii,id, p[0],p[1]); +// printf("EED wxContourMainFrame::SegmentationOneSlice (%d) id=%d px=%f py=%f\n",ii,id, p[0],p[1]); // double x=p[0]; // double y=p[1]; vecX.push_back( p[0] ); @@ -1935,10 +1928,8 @@ polyDataResult->PrintSelf( std::cout, vtkIndent(0) ); vecZ.push_back( -900 ); // vecZ.push_back( p[2] ); } - ExtractControlPoints2D *extractcontrolpoints2d = new ExtractControlPoints2D(); extractcontrolpoints2d->SetContour( &vecX , &vecY , &vecZ ); - //PROOFS /*if (methodRadiobox->GetSelection()==0){ extractcontrolpoints2d->GetInitialControlPoints( &vecCtrlPointX , &vecCtrlPointY , &vecCtrlPointZ ); @@ -1992,8 +1983,7 @@ polyDataResult->PrintSelf( std::cout, vtkIndent(0) ); } // if addedModel } // if sizeCtrPt } // if NumberOfCells > 0 - -printf("EED wxContourMainFrame::SegmentationOneSlice End\n"); +//printf("EED wxContourMainFrame::SegmentationOneSlice End\n"); } int wxContourMainFrame::GetImageDataSizeZ()