[ITK] Best way to convert 4D image to 3D in-place?
Dan Mueller
dan.muel at gmail.com
Wed May 7 04:27:06 EDT 2014
Hi Chris,
You might want to investigate ' Alternative Memory Models for ITK Images'
http://www.insight-journal.org/browse/publication/646
This contribution is quite old now, so may need significant work to compile
with a recent version of ITK...
Good luck.
Cheers, Dan
On 7 May 2014 08:51, "Chris Cooper" <chris.cooper at veranmedical.com> wrote:
> I’ve got a 4-dimensional image (itk::Image<short,4>) and I need to
> extract the first “slice" of that image into a 3-dimensional image
> (itk::Image<short,3>) .
>
> I can do it with an ExtractImageFilter, but since my input and output
> images don’t match, the filter insists on allocating new memory for the new
> image, and that’s not going to fly.
>
> I can do it with an ImportImageFilter by passing the buffer pointer of
> the 4-d image to the filter, and that works fine, but (1) it makes
> assumptions about the layout of the image in memory that I would rather not
> make, and (2) it requires me to Update() my 4-d image manually prior to
> continuing the filter pipeline which while not a problem, is not as “clean”
> as I would like.
>
> Is there a filter that would let me extract the image I need, without
> making unpleasant assumptions and certainly without allocating more memory?
>
> Thanks,
> Chris
>
>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140507/808e61b8/attachment-0002.html>
More information about the Community
mailing list