[Insight-users] DICOM measures

l.a.pereira l.a.pereira at uol.com.br
Wed Dec 9 11:00:08 EST 2009


 Luis, sorry i'm sending message again, I had problem with first email format.

Luis, thanks for reply.

My problem is know how tags I need use to calculate original DICOM dimensions x,y,z to milimeters.

I believe that if I get the total physical extend image I will solve my problem.

My application read a DICOM series and create a Volume. After that, the user will work from slices x,y,z obtained from

vtkImagePlaneWidget->GetResliceOutput(), so I need to establish a co-relation between vtkImagePlaneWidget->GetResliceOutput() and the

original measures of DICOM Series in milimeters.





Em 09/12/2009 13:27, Luis Ibanez < luis.ibanez at kitware.com > escreveu:


Hi Luis,

Could you please be more specific regarding
what you call "measures"   ?

Are you referring to the total physical extent of the image ?
(e.g. the volume of space that is occupied by the image).

or are you referring to measuring distances between pairs
of pixels in the image ?

If you are talking about the second case, then what
you want to do is to take the indices of  both pixels.
(let's call them index1 and index2) and do the following:


 const ImageType * image = reader->GetInput();
 ImageType::PointType point1;
 ImageType::PointType point2;

 image->TransformIndexToPhysicalPoint( index1, point1 );
 image->TransformIndexToPhysicalPoint( index2, point2 );

 const double distance = point1.EuclideanDistanceTo( point2 );

 That value of "distance" will be measured in millimeters,
 which is the default unit in DICOM,

 When the indices are converted to physical points, the
 computation process will take into account:

 A) The coordinates of the image Origin
 B) The values of pixel spacing
 C) The orientation (direction) of the image

 The resulting value of "distance" will therefore be
 in the units of physical space.


As Michiel pointed out, the values of (A), (B) and (C)
are defined in the DICOM tags.   If you are curious
about the values, you could also print them out with

 reader->Update();
 const ImageType * image = reader->GetInput();
 std::cout << image->GetOrigin() << std::endl;
 std::cout << image->GetSpacing() << std::endl;
 std::cout << image->GetDirection() << std::endl;


---

If you were talking about other type of "measures",
please, describe them in detail.


 Thanks,


 Luis


------------------------------------------------------------------------------------------
On Wed, Dec 9, 2009 at 8:13 AM, michiel mentink
 wrote:
> Hi Luis,
>
> try example Examples/IO/DicomSeriesReadPrintTags.cxx.
> It prints the most important tags.
>
> It is described in the itk software guide paragraph 7.12.6
> You can also see those tags summarized on my page on:
> https://sites.google.com/site/michielmentink/programming/itk/image-translate
> (on the bottom).
>
> greets,
>
> Michael
>
> On 12/9/09, l.a.pereira  wrote:
>>
>> Hi,
>>
>> I'm reading a DICOM series with GDCMImageIO.
>>
>> Now, I need obtain the measures of this DICOM series to convert it in
>> milimeters.
>>
>> How can I do it ?
>>
>> There is some tags in DICOM header where I can calculate/convert this
>> measures to milimeters ?
>>
>> Thanks,
>>
>>
>>
>> Luis
>>
>>
>>
>> _____________________________________
>> 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
>
> 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
>
>



More information about the Insight-users mailing list