[Insight-users] Inputs do not occupy the same physical space!

Cory Quammen cquammen at cs.unc.edu
Tue Apr 3 17:59:43 EDT 2012


Francois,

The ChangeInformationImageFilter is probably what you really want to
use to take care of this when it happens. See:

http://www.itk.org/Doxygen/html/classitk_1_1ChangeInformationImageFilter.html

However, using this filter involves adding a few more lines of code
than you probably wanted to have to write for your application.

It would be far more convenient for you to be able to set a flag that
disables the spacing/origin/orientation check. I've run into
situations where such a flag would have been very convenient. No such
flag exists at the moment.

Cory

On Tue, Apr 3, 2012 at 5:18 PM, Cagatay Bilgin <bilgincc at gmail.com> wrote:
> Hi Francois,
>
> You can use the region of interest filter
> http://www.vtk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter
>
> or you can use the pad filter
> http://www.vtk.org/Wiki/ITK/Examples/Images/ConstantPadImageFilter
>
> to make sure that the images have same size. Is this what you are after ?
>
> Cagatay
>
>
> On Tue, Apr 3, 2012 at 1:23 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
> wrote:
>>
>> If you add two images with different spacing, direction and orientation,
>> what do you expect the output image information to be?
>>
>> Brad
>>
>> On Apr 3, 2012, at 3:14 PM, francois rousseau wrote:
>>
>> I understand the hack, but I don't think that's a long-term solution.
>>
>> (I don't want to modify these image properties - and I don't think that it
>> should be necessary)
>>
>> françois
>>
>>
>>
>> On Apr 3, 2012, at 6:38 PM, Hui Tang wrote:
>>
>> What I did is set one of the input image as reference image, copy the
>> original point of that reference image to the other inputs.
>> anotherImage->SetOrigin(referenceImage->GetOrigin() );
>> And then run your codes
>> On Tue, Apr 3, 2012 at 5:28 PM, francois rousseau <rousseau at unistra.fr>
>> wrote:
>>>
>>> Hi everyone,
>>>
>>> is there a way to disable this checking condition in ITK filters?
>>>
>>> (basically, for my application, I know that the images do not share
>>> exactly the same physical space but I want to perform pixelwise computation
>>> (subtraction, etc.))
>>>
>>> thank you very much
>>> François
>>>
>>> _____________________________________
>>> 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
>>
>>
>>
>> --
>> ---------------------------
>> Francois Rousseau
>> LSIIT
>> Pôle API
>> Boulevard Sébastien Brant
>> F-67400 ILLKIRCH
>> tel : +33 3 68 85 44 89
>> email : rousseau at unistra.fr
>> http://lsiit-miv.u-strasbg.fr/miv/19-ROUSSEAU-Francois.html
>>
>> _____________________________________
>> 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
>>
>>
>> ========================================================
>>
>> Bradley Lowekamp
>>
>> Medical Science and Computing for
>>
>> Office of High Performance Computing and Communications
>>
>> National Library of Medicine
>>
>> blowekamp at mail.nih.gov
>>
>>
>>
>>
>>
>> _____________________________________
>> 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
>



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Insight-users mailing list