[vtkusers] help with vtkmarchingsquares
car01a
car01a_ at hotmail.com
Mon Jun 18 15:04:35 EDT 2012
hi I'm beginner I want to visualize the contours of animage but Icant Im
using vtkmarchingsquares I tried with vtkimageviewer but its wrong please
help me
a little of my code where I have problems
I read my image using vtk cause I need to work with dicom
ITKExportType::Pointer itkVTKExporter= ITKExportType::New();
vtkImageImport *vtkImporter = vtkImageImport::New();
itkVTKExporter->SetInput(reader->GetOutput());
ConnectPipelines(itkVTKExporter, vtkImporter);
vtkImporter->Update();
////////////////////////////////////////////////
vtkImageViewer2 *viewer = vtkImageViewer2::New();
vtkRenderWindowInteractor* renderWindowInteractor=
vtkRenderWindowInteractor::New();
vtkSmartPointer<vtkMarchingSquares> contour =
vtkSmartPointer<vtkMarchingSquares>::New();
contour->SetInput(vtkImporter->GetOutput());
contour->GenerateValues(1, .5, .5);
viewer->SetupInteractor( renderWindowInteractor);
viewer->SetInput(contour->GetOutput() );
viewer->SetSlice(60);
viewer->Render();
viewer->SetColorWindow( 255);
viewer->SetColorLevel( 128);
renderWindowInteractor->Initialize();
renderWindowInteractor->Start();
this part is wrong viewer->SetInput(contour->GetOutput() ); why what I have
to put instead??
can not convert parameter 1 from 'vtkPolyData *' to 'vtkImageData *'
--
View this message in context: http://vtk.1045678.n5.nabble.com/help-with-vtkmarchingsquares-tp5713982.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list