[vtkusers] Saving seed points in ImagePlaneWidget

Xiaopeng Yang yxp233 at postech.ac.kr
Mon Oct 25 02:15:07 EDT 2010


Hello everyone,

 

I am working on developing a simple medical image segmentation program,
which provide interactive selection and automatic saving function of
multiple seed points. That means when left-clicking on one of the CT slices,
the 3D position of that point will be automatically saved to the code. 

 

I applied ImagePlaneWidget to pick the position of certain clicked point.
The position and intensity value can be shown on the screen. But I have no
idea how to program to save the position to the code. Could you give me a
hand about how to solve this problem?

 

Here is the code of ImagePlaneWidget:

 

  vtkImagePlaneWidget * zImagePlaneWidget =  vtkImagePlaneWidget::New();

 

  zImagePlaneWidget->DisplayTextOn();

  zImagePlaneWidget->SetInput(vtkImporter->GetOutput());

  zImagePlaneWidget->SetPlaneOrientationToZAxes();

  zImagePlaneWidget->SetSliceIndex(size[0]/2);

  zImagePlaneWidget->SetPicker(picker);

  zImagePlaneWidget->RestrictPlaneToVolumeOn();

  zImagePlaneWidget->SetKeyPressActivationValue('y');

  zImagePlaneWidget->GetPlaneProperty()->SetColor(1, 0, 0);

  zImagePlaneWidget->SetTexturePlaneProperty(ipwProp);

  zImagePlaneWidget->SetResliceInterpolateToNearestNeighbour();

 

  zImagePlaneWidget->SetInteractor( iren );

zImagePlaneWidget->On();

 

Thanks very much.

 

Best regards,

Yang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101025/141a3b62/attachment.htm>


More information about the vtkusers mailing list