[vtkusers] Clip Volume using freehand 2D Curve ROI

longbowzhang longbowzhangchina at gmail.com
Thu Mar 31 03:02:55 EDT 2016


Mallikarjun K wrote
> 1.Can I use vtkboxwidget to draw a bounding box on the volume?  I didn't
> get the pipeline exactly..if you have an example code that would be
> helpful..

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/BoxWidget>  
Is this what you want? 
I still a vtkCubeSource is enough (the following code for setting up the
ITW).
	
        vtkSmartPointer<vtkCubeSource> cubeSource = 
		vtkSmartPointer<vtkCubeSource>::New();
	cubeSource->SetBounds(imageData->GetBounds());
       
        // skip some codes... 
       cubeActor->GetProperty()->SetRepresentationToWireframe();
	
        vtkSmartPointer<vtkImageTracerWidget> tracer =
		vtkSmartPointer<vtkImageTracerWidget>::New();
	tracer->SetInput(imageData);
	tracer->SetInteractor(renderWindowInteractor);
	tracer->SetViewProp(cubeActor);
	tracer->SnapToImageOff();
	tracer->ProjectToPlaneOn();
	tracer->SetProjectionNormalToZAxes();



--
View this message in context: http://vtk.1045678.n5.nabble.com/Clip-Volume-using-freehand-2D-Curve-ROI-tp5737430p5737454.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list