[Insight-users] compare images

Navneeth Subramanian navneeth.s at gmail.com
Fri Aug 10 03:13:11 EDT 2012


Bill - Is it the difference image filter:
http://www.itk.org/Doxygen/html/classitk_1_1AbsoluteValueDifferenceImageFilter.html
you are referring to ?

On Sat, Aug 4, 2012 at 2:55 AM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> There is a similar class in ITKv3, but I can't recall the name.
>
> bill
>
>
> On Fri, Aug 3, 2012 at 5:17 PM, Gerenrot, Mikhail <
> mikhail.gerenrot at stryker.com> wrote:
>
>> Bill,****
>>
>> ** **
>>
>> We use ITK 3.1.****
>>
>> I tried  to upgrade to ITK4, this turned out to be not that simple, so we
>> decided to postpone this for now.****
>>
>> ** **
>>
>> I appreciate you help,****
>>
>> ** **
>>
>> Thank you.****
>>
>> ** **
>>
>> *From:* Bill Lorensen [mailto:bill.lorensen at gmail.com]
>> *Sent:* Friday, August 03, 2012 1:41 PM
>> *To:* Gerenrot, Mikhail
>> *Cc:* insight-users at itk.org
>> *Subject:* Re: [Insight-users] compare images****
>>
>> ** **
>>
>> If you are using itkv4, look at
>> Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.h. It's
>> what itk uses for regression testing.
>>
>> ****
>>
>> On Fri, Aug 3, 2012 at 4:21 PM, Gerenrot, Mikhail <
>> mikhail.gerenrot at stryker.com> wrote:****
>>
>> Hi Team,****
>>
>>  ****
>>
>> We need to check if images are equal, and we wrote a method that uses
>> iterators and compares pixels:****
>>
>> bool AreImagesEqual(const ImageType::Pointer & image1, constImageType::Pointer & image2)
>> ****
>>
>> {****
>>
>>   itk::ImageSliceConstIteratorWithIndex<ImageType> it1( image1,
>> image1->GetRequestedRegion() );****
>>
>>   itk::ImageSliceConstIteratorWithIndex<ImageType> it2( image2,
>> image2->GetRequestedRegion() );****
>>
>>  ****
>>
>>   PixelType p1;****
>>
>>   PixelType p2;****
>>
>>  ****
>>
>> // loop starts****
>>
>> …****
>>
>>   p1 = it1.Get();****
>>
>>   p2 = it2.Get();****
>>
>>   if(p1 != p2)****
>>
>>   {****
>>
>>     return false;****
>>
>>   }****
>>
>> …****
>>
>> // loop ends****
>>
>> return true;****
>>
>> }****
>>
>>  ****
>>
>> Is there any better way?****
>>
>> Any input will be greatly appreciated.****
>>
>>  ****
>>
>> Thank you all in advance,****
>>
>>  ****
>>
>> Your Mike Gerenrot****
>>
>> Stryker Corp.****
>>
>>  ****
>>
>>
>> _____________________________________
>> 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****
>>
>>
>>
>>
>> --
>> Unpaid intern in BillsBasement at noware dot com****
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
>
> _____________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120810/e03ecaa1/attachment.htm>


More information about the Insight-users mailing list