[vtkusers] [Insight-users] Saving seed points in ImagePlaneWidget

Darshan Pai darshanpai at gmail.com
Sun Oct 31 15:18:47 EDT 2010


I use the GetCursorData() function in ImagePlaneWidget for selecting the
seed points with left mouse button click .

Regards
Darshan

On Sun, Oct 31, 2010 at 10:08 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Xiaopen,
>
> Capture the "EndPickEvent" with an Observer,
> and in the execute method of the observer,
> extract the coordinates of the point with code
> similar to:
>
>   double data[3];
>   picker->GetPickPosition( data );
>
>   itk::Point< double, 3 > pickedPoint;
>   pickedPoint[0] = data[0];
>   pickedPoint[1] = data[1];
>   pickedPoint[2] = data[2];
>
>
> ---
>
> See the example:
>
> VTK/Examples/Annotation/Python/annotatePick.py
>
>
>    Regards,
>
>
>          Luis
>
> ----------------------------------------------------------------
> On Mon, Oct 25, 2010 at 2:15 AM, Xiaopeng Yang <yxp233 at postech.ac.kr>wrote:
>
>>  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
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101031/a81201d8/attachment.htm>


More information about the vtkusers mailing list