]> Creatis software - creaContours.git/commitdiff
#3381 Clean Code Segmentation VTK
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 5 Jan 2022 10:12:46 +0000 (11:12 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 5 Jan 2022 10:12:46 +0000 (11:12 +0100)
lib/Interface_ManagerContour_NDimensions/wxContourMainFrame.cxx

index 48c038b0a87b3279d93362d81e89b534ac091673..6e93fadb4224064ba277a8404199059646aae5ef 100644 (file)
@@ -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<double> vecCtrlPointY;
        std::vector<double> vecCtrlPointZ;
 
-printf("EED wxContourMainFrame::SegmentationOneSlice GetNumberOfLines=%d \n",polyDataResult->GetNumberOfLines() );
-
-int numberOfPointsInCell;
-int numberOfcells=polyDataResult->GetNumberOfCells();
-for (int jj=0; jj<numberOfcells ; jj++)
-{
-       vtkCell* vtkcell = polyDataResult->GetCell( 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; jj<numberOfcells ; jj++)
+//{
+//     vtkCell* vtkcell = polyDataResult->GetCell( 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;ii<size;ii++)
                {
        //              id      = polyDataResult->GetLines()->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()