[Insight-users] index problem

Corinne Mattmann mattmaco at ee.ethz.ch
Wed, 7 Jan 2004 08:32:24 -0700


Hi Luis,

With index I mean the starting point of the image.
I check the index with making a cout of
pyramid->GetOutput(CurrentLevel)->GetLargestPossibleRegion() (or
GetRequestedRegion(), it's the same in my case)
and get the three parameters "Dimension", "Index" and "Size".

Sorry for not asking the question clearly,
Corinne


-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: Wednesday, January 07, 2004 7:03 AM
To: Corinne Mattmann
Cc: insight-users at itk.org
Subject: Re: [Insight-users] index problem


---------

About your index question,

It is not clear what you mean by

    "I have and image with index [3,1,1]"

is that the "size" of the image ?

or are you making reference to one pixel
in the image that is located at index [3,1,1] ?

Could you please rephrase the question to
give us a better idea of the problem you
are facing ?

Or maybe post a minimal code example that
illustrates the problem...


Thanks



   Luis



------------------------
Corinne Mattmann wrote:
> Hi Luis,
> 
> Thanks for your answer. I would like to make my image smaller with the

> same content (cut some pixels away at the border and set another 
> index), so I think A) should work. At the moment I have another 
> questions: I am programming a filter which registers two images with 
> the demons algorithm using a multi-resolution pyramid. To set up the 
> pyramid I'm using itkRecursiveMultiResolutionPyramidImageFilter.
> If I have an image with index [3,1,1] and if I reduce it by a factor
of
> 2, the output of the pyramid would be an image with index [2,1,1].
> This images I input into the demons-filter and get as output a
> deformable field with the same index. So far so good.
> But if I now expand this deformable field with the
> itkVectorExpandImageFilter, I get an image with index [4,2,2], which
> results in an error when I apply it to the images with index [3,1,1].
> Took me quite long to find this problem ;-)
> I wanted to set the "right" index at the expand filter but I couldn't
> find an appropriate function. What solution do you suggest?
> 
> Thanks very much for your answer and have a nice evening, Corinne
> 
>