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
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] );
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 );
} // if addedModel
} // if sizeCtrPt
} // if NumberOfCells > 0
-
-printf("EED wxContourMainFrame::SegmentationOneSlice End\n");
+//printf("EED wxContourMainFrame::SegmentationOneSlice End\n");
}
int wxContourMainFrame::GetImageDataSizeZ()