[ITK] PasteImageFilter
Bradley Lowekamp
blowekamp at mail.nih.gov
Wed May 7 09:35:50 EDT 2014
On May 7, 2014, at 9:29 AM, David Froger <david.froger.ml at mailoo.org> wrote:
>> I don't believe that Paste writing is supported by HDF5 image file format. If it is it might not be well tested.
>
> From what I've understand, you're right : it is not well tested, but it works.
> (Writing in a new HDF5 file region by region works, but writing a region in an
> existing file doesn't works, because the HDF5 file is not opened with the
> right mode).
>
>> You might want to try an mha file extension to use the MetaImageIO file formation. I have used the mha and mrc file extensions heavily with streaming and have complete confidence in their implementation. I don't have much first hand experience with hdf5 though.
>
> Unfortunatelly, I'm not free to change the file format... It's already fixed
> by the team I work with.
Trying a different file format allows you to determine if the problem is with your code or the HDF5 ImageIO.
>
>> I have had to do simular operations before. However, I don't use the Paste feature for Streaming IO, just set the number of streaming streaming divisions. What I do is I create a pipeline which composes all the files ( sometime the JoinSeriesImageFilter or the TileImageFilter ) which can be the PasteImageFilter for you, then set that as input to the writer where the number of streaming divisions is set to the number of z-slices. To get the information from the input files call ImageFileReader::UpdateOutputInformation(). This will update the meta-data ( largest possible region, meta-data dictionary etc), but not read the image data.
>
> I'll try this approach!
>
> Thank you,
> David
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
More information about the Community
mailing list