[Insight-users] Pasting with StreamingImageIOBase

Matthias Schneider schneider at vision.ee.ethz.ch
Wed Dec 5 13:22:58 EST 2012


Hi,

I'm trying to understand the itk IO streaming capabilities (ITK v4.2.1).
The documentation of StreamingImageIOBase says:

 > The implementation supports streaming of an arbitrary sized region
 > as well as pasting to new or existing file ( of the same name, size, 
 > and pixel type ).

I played around with the HDF5 file format but I couldn't get the 
"pasting into existing file" part to work. I'm not sure if I have a 
wrong understanding of ImageFileWriter::SetIORegion but it seems like 
"pasting" is rather "overwriting".

I attached a piece of code.
What it does is to set up a small volume (16x32x64, double pixel 
values), initialize all voxels to 1, write the volume as a HDF5 file.
In a second step I'm trying to paste a single slice (16x32) into the 
existing file. The pasted values seem to be correct but the remaining 
pixel values in all other slices seem to be random.
Before digging further into this I was hoping to at least get an idea 
if I am using the pipeline correctly or if there might be a bug in the 
streaming/HDF5/documentation.

Any comments are appreciated very much!

Thank you very much!

Best,
Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.gz
Type: application/gzip
Size: 1323 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121205/68b89bd1/attachment.bin>


More information about the Insight-users mailing list