[Insight-users] Get the selection point in screen (pixel) coordinates

Xiaopeng Yang yxp233 at postech.ac.kr
Mon Nov 29 08:28:50 EST 2010


.Bold { font-weight: bold; }
.Title { font-weight: bold; font-size: 18px; color: #cc3300; }
.Code { border: #8b4513 1px solid; padding-right: 5px; padding-left: 5px;color: #000066; font-family: 'Courier New' , Monospace;background-color: #ff9933; }

Dear friends,



I applied vtkPointPicker to pick a point in screen (pixel) coordinates from a dataset. The data are a series of CT images. However, there are two problems: 1) the z value is always 0, no matter in which slice I pick a point; 2) the x and y values are different from other programs like MITK. I compared the values of the same point between my program and MITK. MITK shows that the z value changes according to which slice you are in to pick a point.



Here is my code:






double


 


std::cout <<


 index[3];
this
->Interactor->GetPicker()->GetSelectionPoint(index);
"Index: "
 << index[0] << 
" "
 << index[1] << 
" "
 << index[2] << std::endl;









BODY{FONT-SIZE: 10pt;}
DIV, P {FONT-SIZE: 10pt;margin-top:2px;margin-bottom:2px;}
TD {FONT-SIZE: 10pt}




Ergonomic Design Technology Lab

Dept. of Industrial and Management Engineering

Pohang Univ. of Science and Technology

South Korea

Tel: 82-54-279-8246

HP: 82-10-9794-0110
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101129/72fd6a33/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vcard.vcf
Type: text/x-vcard
Size: 39 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101129/72fd6a33/attachment.vcf>


More information about the Insight-users mailing list