[Insight-users] PadImageFilter question

Miller, James V (Research) millerjv at crd . ge . com
Wed, 20 Aug 2003 12:28:41 -0400


You can use the ChangeInformationImageFilter to make the padded image 
have the same indices as your biggerImageReader.  You'll probably want to 
use the SetReferenceImage()/UseReferenceImage(). The input will be the 
the output of the pad filter and the reference image will be the output
of the biggerImageReader.  

Note the images need to be same size.



> -----Original Message-----
> From: Benjamin King [mailto:king . benjamin at mh-hannover . de]
> Sent: Wednesday, August 20, 2003 12:41 PM
> To: ITK
> Subject: [Insight-users] PadImageFilter question
> 
> 
> Hello all,
> 
> I'm a bit confused about how ITK handles regions. I tried to 
> multiply two 
> images with potentially different extent, so I padded the 
> smaller one to 
> the full size (ConstantPadImageFilter). After that, I used a 
> MultiplyImageFilter. The results are only correct if the 
> input images have 
> equal size. If they haven't, the multiplicated image looks shifted.
> 
> For images of different size, padFilter->GetOutput()- 
> >GetLargestPossibleRegion().Print(cout) yields
>    Dimension: 3
>    Index: [-25, -25, -25]
>    Size: [150, 150, 150]
> 
> while biggerImageReader->GetOutput()->GetLargestPossibleRegion() 
> .Print(cout) prints
>    Dimension: 3
>    Index: [0, 0, 0]
>    Size: [150, 150, 150]
> 
> I assume that the different indices cause the trouble. I 
> tried to write the 
> output of the ConstantPadImageFilter to disk and read it back 
> again. That 
> works, but I hope there is a better way...
> 
> Help is much appreciated and I also can provide code and data that 
> demonstrate the problem.
> 
> Best regards,
>   Benjamin
> 
> -- 
> Benjamin King
> Institut fur Medizinische Informatik
> Medizinische Hochschule Hannover
> Tel.: +49  511  532-2663
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>