[Insight-users] Extract an oblique 2D slice from a 3D volume
Luis Ibanez
luis.ibanez at kitware.com
Tue May 8 08:49:01 EDT 2007
Hi Gheorghe
Mmm, you didn't do your homework.
You have not read the ITK Software Guide chapter.
Should you have read the chapter, you could have found that you
can compute a single slice as the output of the resampling by
just selecting an image grid of dimensions ( N x M x 1 ).
... and you could have avoided jumping to the *incorrect*
conclusion that this is an inefficient method...
You *don't need to resample the entire volume*, you can define the
exact grid of points for which pixel values are to be computed.
Please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
Section 6.9.4 "Resample Image Filter", pdf-pages 254-284.
What you need is to define a rigid 3D transform, and to setup
an Output image grid of dimensions N x M x 1.
Beware of the Aristotelian syndrome:
"Too much idle thinking...
not enough experimentation"
Regards,
Luis
----------------------------
Gheorghe Postelnicu wrote:
> Hi Luis,
>
> Thanks for the suggestion. My prototype solution will indeed use the
> aproach you suggest. However, it is obviously inefficient, as it will
> resample the entire volume, when I will only need one slice.
> Additionally, it presents the disadvantage of increasing the number of
> necessary interpolations: to get the pixel value at a position, 2
> interpolations (instead of one) will be necessary.
>
> That is why I was thinking that an image wrapper class would be great.
> If you can suggest an example or a skeleton of the methods that I
> would need to write to make this happen, I would be more than happy to
> contribute the code resulting.
>
> Thanks,
>
> On 5/7/07, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>>
>>
>> Hi Gheorghe
>>
>>
>> You may want to use the
>>
>> ResampleImageFilter
>>
>>
>> You will have to provide the Transform that defines the resampling
>> plane, and the parameters of the image grid that you want to use
>> for the 2D image.
>>
>> Please read the ITK Software Guide
>>
>>
>> http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>
>> in particular the section on "Geometric Transformations".
>>
>> This section describes how you can set the parameters of a
>> resampling problem.
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>>
>> ---------------------------
>> Gheorghe Postelnicu wrote:
>> > Hi,
>> >
>> > I am looking into ways to extract an oblique 2D slice from a 3D
>> > volume. This is to be part of an iterative algorithm, so it would be
>> > great to be able to setup an image wrapper that would emulate a 2D
>> > image only sampling pixels when necessary. It would actually be great
>> > if I were able to call a registration filter on one of these image
>> > objects.
>> >
>> > The closest filter I found was ExtractImageFilter, but I don't think
>> > it fulfills the requirements I have tried to expose above.
>> >
>> > It would be great if someone could provide some guidance on the
>> > methods I would need to overwrite when writing a wrapper for a class
>> > that would emulate a 2D oblique slice of a 3D volume or any other
>> > method that would efficiently achieve this.
>> >
>> > Thanks,
>>
>
>
More information about the Insight-users
mailing list