pyushkevich / itksnap

ITK-SNAP medical image segmentation tool
http://www.itksnap.org
GNU General Public License v3.0
305 stars 90 forks source link

Map Segmentation on Two Images Simultaneously #15

Open kaimingkuang opened 4 years ago

kaimingkuang commented 4 years ago

I have two dicom series of different modalities (CT and PET), different shapes and different spacing, and both are taken in the same study. When I open them simultaneously in itk-snap and open the segmentation for CT, itk-snap can map the segmentation on both series correctly. How did you do that? How did you map two images with different shapes to the same space?

pyushkevich commented 4 years ago

The DICOM image has a header that describes where the image is located in the scanner coordinate system. ITK-SNAP uses that information when rendering images. More precisely, images loaded as "additional" images in ITK-SNAP are resampled and interpolated into the space of the "main" image. The segmentation resides in the space of the main image as well.

On Mon, May 11, 2020 at 6:46 AM kaimingkuang notifications@github.com wrote:

I have two dicom series of different modalities (CT and PET), different shapes and different spacing, and both are taken in the same study. When I open them simultaneously in itk-snap and open the segmentation for CT, itk-snap can map the segmentation on both series correctly. How did you do that? How did you map two images with different shapes to the same space?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pyushkevich/itksnap/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEW4TFNF22RGMUX7PUIDRQ7JQRANCNFSM4M5ZOY5A .

-- Paul A. Yushkevich, Ph.D. Associate Professor Penn Image Computing and Science Laboratory Department of Radiology University of Pennsylvania

kaimingkuang commented 4 years ago

Thank you for your response. I am trying to align the mentioned two images (CT and PET). Basically what I intend to do is to put two images in the same coordinate system, and crop the same area from both of them for further analysis. Here are my steps: 1) Resample CT and PET to the same spacing; 2) Since these two images don't have the same shape after step 1, I calculate the offset (pixel-coordinate shift) between two images using their origins and spacings, put them in the same coordinate system based on that offset; 3) Crop the intersection between two images.

This approach works perfectly on other image-mask pairs. However, when I tried to align these two images, they don't even have any intersection after step 2). So I was wondering is there anything that I miss?

The DICOM image has a header that describes where the image is located in the scanner coordinate system. ITK-SNAP uses that information when rendering images. More precisely, images loaded as "additional" images in ITK-SNAP are resampled and interpolated into the space of the "main" image. The segmentation resides in the space of the main image as well. On Mon, May 11, 2020 at 6:46 AM kaimingkuang @.***> wrote: I have two dicom series of different modalities (CT and PET), different shapes and different spacing, and both are taken in the same study. When I open them simultaneously in itk-snap and open the segmentation for CT, itk-snap can map the segmentation on both series correctly. How did you do that? How did you map two images with different shapes to the same space? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#15>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJPEW4TFNF22RGMUX7PUIDRQ7JQRANCNFSM4M5ZOY5A . -- Paul A. Yushkevich, Ph.D. Associate Professor Penn Image Computing and Science Laboratory Department of Radiology University of Pennsylvania