[Insight-users] Automated cropping of an image based on image segmentation

Luis Ibanez luis.ibanez at kitware.com
Mon Dec 21 19:35:40 EST 2009


Hi Lodron,


A) About your first question:

For cropping an image to the size of the segmented
object you can use the recently added filter:

     Insight/Code/Review/
                             itkAutoCropLabelMapFilter.h


B) About your second question:

The size of the image mask will be (mostly**) irrelevant
for the purpose of evaluating the computation time of
the registration algorithm.

The "mostly" qualifier is added here, just because with
a smaller image you "may" get better memory caching
in your processor... but.... in practice, given all the things
that are moving on in the registration framework at the
same time, I would think that it is unlikely that such
potential caching manages to make any difference.
(... of course,... only a carefully executed experiment
will tell for sure).

In any case, using the filter in (A) is so easy, the
you may just go for it.


     Regards,


           Luis





----------------------------------------------------------------------------------------
On Wed, Dec 16, 2009 at 3:53 AM, Lodron, Gerald
<Gerald.Lodron at joanneum.at> wrote:
>
> Hello,
>
> I have two 3D CT images which i want to register. I want first segment the human from the rest because I think the environment (patient table etc) will/can disturb the registration. The segmentation already works perfect, I use a simple connected threshold filter in combination with an image closing which results in an image of zeros and ones.
>
> Now I have two questions:
>
> - I think it would be a great idea (performance reasons) to automatically crop the image depending on that segmentation result but i have no idea how to do this efficiently, any ideas?
>
>
> - In the imageToImageMetric I found the functions: SetFixedImageMask and SetMovingImageMask
>  They needs a type called Spatial Objects so I think i had to use the itk::ImageSpatialObject class to convert my itk Image into such a spatial object type. Here is my question: Is it advisable to make a cropping and this image mask stuff or will the image mask stuff make everything internal to compute the result fast?
>
> Best regards
>
> _____________________________________
> 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