[Insight-users] How to create a volume out of two volumes

Kent Williams kent at psychiatry.uiowa.edu
Fri Mar 3 17:12:25 EST 2006


itk::TileImageFilter can assemble a set of volumes into one image. The 
output image can have a higher dimension than the set of input images, 
so you can use it to assemble 2D images into a 3D volume, or 3D images 
into a 4D time series.  The catch is that all input images need to exist 
before calling itk::TileImageFilter::Update().

So really, in your case, that's no help at all.

Might I propose a different solution for you? Why not just read in two 
2D slices at a time, average them, and write out the averaged image to a 
new DICOM directory?

The other solution, which might actually be less expensive in the long 
run, is invest in more memory for your computer. a 512x512x818 image of 
floats amounts to 818 megabytes of memory. 

For that matter, you could just write a 'naive' program that reads all 
the slices into memory, resamples the volume and writes it out. So long 
as your swap space is large enough,  you should be able to process 
images larger than physical memory. This lets the CPU and the OS worry 
about shuttling portions of the file in and out of main memory, so you 
won't have to.  This will cause disk thrashing, but then your program is 
already thrashing the disk reading sub-volumes of your image and writing 
them back out.


Markova Aneta wrote:

> Hi all,
>
> I had a 2D DICOM series of 818 images with dimension 512x512, which I 
> have to sub-sample along Z direction, so that I have an output volume 
> of 512x512x409.
>
> Since, the data set it is very big, I had to do this processing in 
> partitions. Thus, I am reading a part of 2D DICOM files, sub-sampling 
> it and writing a volume out of it. At the end I have few volumes which 
> I have to put back together into one volume.
>
> I had a look at the ITK Doxygen, but I have no idea till now how to do 
> it.
>
> Does anybody have any idea what filter I can use for this purpose?
>
>
> Thank you for any help,
>
> Aneta
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>



More information about the Insight-users mailing list