[Insight-users] PadImageFilter question

Benjamin King king . benjamin at mh-hannover . de
Wed, 20 Aug 2003 17:40:38 +0100


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 für Medizinische Informatik
Medizinische Hochschule Hannover
Tel.: +49  511  532-2663