[Insight-developers] Proposal: Add more streaming IO with a base class

Luis Ibanez luis.ibanez at kitware.com
Fri Nov 13 12:00:52 EST 2009


Hi Brad,

This is great !,

A nice example of code reuse.

Writing an Insight Journals sound like a good idea to me.

Particularly because it will document the class and the design
for any future developers.

You could simply submit the same tests that you already have
in ITK, and state that the code is in the toolkit already and that
the paper is provided as a technical report for future developers.

This will be extremely useful as we go converting other ImageIO
classes to support streaming.


       Luis



------------------------------------------------------------------
On Thu, Nov 12, 2009 at 1:13 PM, Bradley Lowekamp
<blowekamp at mail.nih.gov> wrote:
> Hello,
> Recently I have gotten itkVTKImageIO to perform IO streaming. This was done
> by re-use a class I had already written: itkStreamingImageIOBase which is
> derived from itkImageIOBase. It adds streaming methods that were implemented
> in itkMetaImageIO for IO region management, a long with:
> bool StreamingImageIOBase::StreamWriteBufferAsBinary(std::ostream& file,
> const void *_buffer);
> bool StreamingImageIOBase::StreamReadBufferAsBinary(std::istream& file, void
> *_buffer);
> Details can be found here:
> http://erie.nlm.nih.gov/cgi-bin/viewvc.cgi/Repository/blowekamp/itkCommandLineTools/trunk/itkLocal/itkStreamingImageIOBase.cxx?revision=5226&view=markup
> With this class it was easy to make itkVTKImageIO stream, just by keeping
> track of the header size, and calling the appropriate BufferAsBinary method
> (unless the file is ASCII of course).
> I thought about just doing an IJ submission, but all the tests are already
> in ITK so that would be more work. Since this is just adding a feature to an
> existing class in a well structured and flexible way does this need to  be
> an IJ submission?
> Brad
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
> _______________________________________________
> 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://kitware.com/products/protraining.html
>
> 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-developers
>
>


More information about the Insight-developers mailing list