Hi Luis Pereira,<br><br>If I understand correctly, you want to know how big the dicom volume is in mm.<br>I think Luis has answered that already.<br><br>However, I can give you a different answer, why don't you calculate<br>
<br>(number of pixels along an axis) * (pixel size in mm)<br>(slice thickness) * (number of slices) ?<br><br>Those dimensions you can find in your dicom tags.<br><br>Good luck,<br><br>Michael<br><br><br><br><br><div class="gmail_quote">
On Wed, Dec 9, 2009 at 4:00 PM, l.a.pereira <span dir="ltr"><<a href="mailto:l.a.pereira@uol.com.br">l.a.pereira@uol.com.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Luis, sorry i'm sending message again, I had problem with first email format.<br>
<br>
Luis, thanks for reply.<br>
<div class="im"><br>
My problem is know how tags I need use to calculate original DICOM dimensions x,y,z to milimeters.<br>
<br>
</div>I believe that if I get the total physical extend image I will solve my problem.<br>
<div class="im"><br>
My application read a DICOM series and create a Volume. After that, the user will work from slices x,y,z obtained from<br>
<br>
vtkImagePlaneWidget->GetResliceOutput(), so I need to establish a co-relation between vtkImagePlaneWidget->GetResliceOutput() and the<br>
<br>
original measures of DICOM Series in milimeters.<br>
<br>
<br>
<br>
<br>
<br>
</div><div class="im">Em 09/12/2009 13:27, Luis Ibanez < <a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a> > escreveu:<br>
<br>
<br>
</div><div><div></div><div class="h5">Hi Luis,<br>
<br>
Could you please be more specific regarding<br>
what you call "measures" ?<br>
<br>
Are you referring to the total physical extent of the image ?<br>
(e.g. the volume of space that is occupied by the image).<br>
<br>
or are you referring to measuring distances between pairs<br>
of pixels in the image ?<br>
<br>
If you are talking about the second case, then what<br>
you want to do is to take the indices of both pixels.<br>
(let's call them index1 and index2) and do the following:<br>
<br>
<br>
const ImageType * image = reader->GetInput();<br>
ImageType::PointType point1;<br>
ImageType::PointType point2;<br>
<br>
image->TransformIndexToPhysicalPoint( index1, point1 );<br>
image->TransformIndexToPhysicalPoint( index2, point2 );<br>
<br>
const double distance = point1.EuclideanDistanceTo( point2 );<br>
<br>
That value of "distance" will be measured in millimeters,<br>
which is the default unit in DICOM,<br>
<br>
When the indices are converted to physical points, the<br>
computation process will take into account:<br>
<br>
A) The coordinates of the image Origin<br>
B) The values of pixel spacing<br>
C) The orientation (direction) of the image<br>
<br>
The resulting value of "distance" will therefore be<br>
in the units of physical space.<br>
<br>
<br>
As Michiel pointed out, the values of (A), (B) and (C)<br>
are defined in the DICOM tags. If you are curious<br>
about the values, you could also print them out with<br>
<br>
reader->Update();<br>
const ImageType * image = reader->GetInput();<br>
std::cout << image->GetOrigin() << std::endl;<br>
std::cout << image->GetSpacing() << std::endl;<br>
std::cout << image->GetDirection() << std::endl;<br>
<br>
<br>
---<br>
<br>
If you were talking about other type of "measures",<br>
please, describe them in detail.<br>
<br>
<br>
Thanks,<br>
<br>
<br>
Luis<br>
<br>
<br>
------------------------------------------------------------------------------------------<br>
On Wed, Dec 9, 2009 at 8:13 AM, michiel mentink<br>
</div></div><div class="im"> wrote:<br>
> Hi Luis,<br>
><br>
> try example Examples/IO/DicomSeriesReadPrintTags.cxx.<br>
> It prints the most important tags.<br>
><br>
> It is described in the itk software guide paragraph 7.12.6<br>
> You can also see those tags summarized on my page on:<br>
> <a href="https://sites.google.com/site/michielmentink/programming/itk/image-translate" target="_blank">https://sites.google.com/site/michielmentink/programming/itk/image-translate</a><br>
> (on the bottom).<br>
><br>
> greets,<br>
><br>
> Michael<br>
><br>
</div><div><div></div><div class="h5">> On 12/9/09, l.a.pereira wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I'm reading a DICOM series with GDCMImageIO.<br>
>><br>
>> Now, I need obtain the measures of this DICOM series to convert it in<br>
>> milimeters.<br>
>><br>
>> How can I do it ?<br>
>><br>
>> There is some tags in DICOM header where I can calculate/convert this<br>
>> measures to milimeters ?<br>
>><br>
>> Thanks,<br>
>><br>
>><br>
>><br>
>> Luis<br>
>><br>
>><br>
>><br>
>> _____________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Kitware offers ITK Training Courses, for more information visit:<br>
>> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>><br>
>> Please keep messages on-topic and check the ITK FAQ at:<br>
>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>><br>
><br>
><br>
> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
<br>
</div></div></blockquote></div><br>