SV: [Insight-users] How to map a 3DMesh vertex to a specific pixel on a DICOM image?

Marcus Wallin wallmarc at gmail.com
Tue Nov 8 15:26:53 EST 2005


This question is 2 months old now, and the answer provided by Luis was
sufficient then. However, I have now stumbled upon a problem related to
this.

What I currently have achieved is to load a set of DICOM images into a 3D
Image and apply the deformable model on it to get a Mesh. For each vertex in
the Mesh I need to be able to map back to a pixel on a specific DICOM file.
This mapping should preferably be done by using some kind of index, e.g. the
vertex [32.4, 54.3, 65.1] in the mesh maps to the pixel [32, 54] on the
DICOM image with index 65 in the DICOM-series.

Using the following proposed method by Luis:

    image->TransformPhysicalPointToIndex(  vertex, index );

works like a charm, at least for the DICOM images series I used then
(consisting of 80 images). All indices of all my vertices in the mesh points
to images in the range (0 <= image_index < 80).

However, when I tried to use a different DICOM series, with a merely 40
images, I only got negative image indices.

How is this possible?
What can I do to get a "reference" back to a specific DICOM image file?


Thanks for answers!

--
Marcus Wallin
Software Engineer
Chalmers University of Technology, Sweden

-------------------------------------------------
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: den 16 September 2005 04:36
Till: Marcus Wallin
Copy: insight-users at itk.org
Subject: Re: [Insight-users] How to map a 3DMesh vertex to a specific pixel
on a DICOM image?


Hi Marcus,

If what you want is to find the pixel index corresponding
to every vertex in your Mesh, you can simply use the method
provided by the image class:

      image->TransformPhysicalPointToIndex(  vertex, index );

This method takes the physical coordinates of your vertices
and return the image index that you can use to address the
image pixels, for example for calling

      PixelValue = image->GetPixel( index );


   Regards,


      Luis


---------------------
Marcus Wallin wrote:
> Hi, 
> 
> I'd like to generate a Mesh, from a volume represented by a DICOM-series,
> using something similar to the procedure described in the SoftwareGuide:
> 9.4.4 Deformable Model.
> 
> My actual question is: After I've got a Mesh, is it possible to map a
> vertex, from this Mesh, to the specific image in the DICOM-series from
which
> the vertex originated from, and which pixel it corresponds to on that
image?
> 
> I would be delighted to any suggestions on how this problem could be
solved.
> 
> --
> Marcus Wallin
> Software Engineer
> Chalmers University of Technology, Sweden
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 




More information about the Insight-users mailing list