[Insight-users] Extract non consecutive slices from a volume
Jon Haitz Legarreta
jhlegarreta at vicomtech.org
Wed May 30 15:33:10 EDT 2012
Dear Jaime,
for sure it is possible.
A solution may be downsampling the image by a factor of two in the Z axis.
Chapter 8.12 in the ITK software guide has some information about it.
Another one may be iterating over the whole volume by means of the image
iterators provided by ITK and then keep the desired slice only, building up
a volume with half the number of slices the original volume had.
The voxel size may be changed by a resampling operation over an image. The
ResampleImageFilter does this (downsampling, upsampling or resizing):
http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/ResampleImageFilter
I guess any of the two should do the trick.
Regards,
JON HAITZ
On 30 May 2012 19:26, Jaime Tarjuelo <jtarjuelo at gbt.tfo.upm.es> wrote:
> Hello,
>
> I am working with a volume (.mhd image) of 38 slices and 1x1x3 voxel size.
> I want to convert it to a volume of 19 slices and 1x1x6 voxel size. I am
> trying to extract non consecutive slices (1,3,5,7,...) and construct the
> desired volume. I have tried to use ExtractImageFilter but I have not been
> able to select non consecutive slices. I can extract a 3D region setting
> the region, the start slice and the size, but of consecutive slices.
>
> I also have thought about performing a resample on the image, but in my
> opinion it would suposse a higher information loss than selecting non
> consecutive slices. Maybe I am wrong at this point.
>
> So question are, is it possible to extract non consecutive slices in order
> to build another image? And may the voxel size of this new image change?
>
> Thank you very much for your help.
>
> Jaime Tarjuelo.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120530/64b84840/attachment.htm>
More information about the Insight-users
mailing list