<p dir="ltr">Hi Chris,</p>
<p dir="ltr">You might want to investigate ' Alternative Memory Models for ITK Images'<br>
<a href="http://www.insight-journal.org/browse/publication/646">http://www.insight-journal.org/browse/publication/646</a></p>
<p dir="ltr">This contribution is quite old now, so may need significant work to compile with a recent version of ITK...</p>
<p dir="ltr">Good luck.</p>
<p dir="ltr">Cheers, Dan</p>
<div class="gmail_quote">On 7 May 2014 08:51, "Chris Cooper" <<a href="mailto:chris.cooper@veranmedical.com">chris.cooper@veranmedical.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>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>) .</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Is there a filter that would let me extract the image I need, without making unpleasant assumptions and certainly without allocating more memory?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Chris</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div>