[Insight-users] auto crop image
Bradley Lowekamp
blowekamp at mail.nih.gov
Mon Sep 23 09:01:35 EDT 2013
Hello,
Another option would be to use the LabelStatisticsImageFilter to get the bounding box:
http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html
http://www.itk.org/Doxygen/html/classitk_1_1LabelStatisticsImageFilter.html#a132a7474536f24a7285950353cfe0e3c
Then combine that with the largest possible region to make the itk::ImageRegion you want. And place that into on of these filters:
http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html
http://www.itk.org/Doxygen/html/classitk_1_1CropImageFilter.html
Brad
On Sep 22, 2013, at 7:35 PM, Dan Mueller <dan.muel at gmail.com> wrote:
> Hi Anja,
>
> You might want to try the AutoCropLabelMapImageFilter:
> http://www.itk.org/Doxygen/html/classitk_1_1AutoCropLabelMapFilter.html
>
> HTH
>
> Cheers, Dan
>
> On 23 September 2013 05:16, Anja Ende <anja.ende at googlemail.com> wrote:
>> Hello,
>>
>> Is there a way to auto crop an image along a particular dimension in ITK.
>> So, basically I want to remove all the zero value background rows in an
>> image and adjust the image origin accordingly according to the removed rows.
>>
>> Is there an easy way to do this in ITK? Sort of like an auto crop filter?
>>
>> Thanks for your help.
>>
>> Cheers,
>>
>> Anja
>>
>> _____________________________________
>> 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.php
>>
>> 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.php
>
> 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