<font size="2"><font face="verdana,sans-serif">I think the attached image will clarify it.<br></font></font><br><div class="gmail_quote">2011/4/8 Ella Maria Kadas <span dir="ltr">&lt;<a href="mailto:ella_kadas@yahoo.com">ella_kadas@yahoo.com</a>&gt;</span><br>

<br>Hi,<br>   I am not sure i understand what u are trying to say. My images are a copy of the dicom series i read. And the ROI is created on those dicom series. So the image and the roi position are very much related. I am just using osirix to create the rois.<br>

Maybe u can explain what u ment.<br>Cheers,<br>   Ella<br>--- Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt; schrieb am Fr, 8.4.2011:<br><br>Von: Dženan Zukić &lt;<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>&gt;<br>

Betreff: Re: [Insight-users] TransformPhysicalPointToIndex not what i expected<br>An: &quot;Ella Maria Kadas&quot; &lt;<a href="mailto:ella_kadas@yahoo.com">ella_kadas@yahoo.com</a>&gt;<br>CC: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>

Datum: Freitag, 8. April, 2011 09:42 Uhr<br><br>TransformPhysicalPointToIndex works on an image and requires indices related to the image, not for some ROI you want. You must add ROI&#39;s start indices to XYZ of a point within ROI.<br>

HTH<br><br>On Thu, Apr 7, 2011 at 16:05, Ella Maria Kadas &lt;<a href="mailto:ella_kadas@yahoo.com">ella_kadas@yahoo.com</a>&gt; wrote:<br><br>Hi,<br><br>   I am trying to convert coordinates that a get from points in a roi from a DICOM series to pixelindexes. The Coordinates that i use to initialize pointTemp are the right ones but when i use TransformPhysicalPointToIndex the index coordinates are all the same.<br>

<br> Please help:)<br><br>Cheers,<br><br>  Ella<br><br>Here is the code:<br><br>ImageType::IndexType pixelIndex;<br><br>ImageType::PointType pointTemp;<br><br>NSPoint roiP = [[roiPoints objectAtIndex:k] point];<br><br>float clocs[3];<br>

<br>[ pix convertPixX: roiP.x pixY: roiP.y toDICOMCoords: clocs ];<br><br>pointTemp[0] = clocs[0];<br><br>pointTemp[1] = clocs[1];<br><br>pointTemp[2] = clocs[2];<br><br>bool isInside = result-&gt;TransformPhysicalPointToIndex(pointTemp,pixelIndex);<br>

<br>if(inside)result-&gt;SetPixel(pixelIndex,0);<br><br></div><br>