[Insight-developers] ImageFileReader/Writer read progress
Karthik Krishnan
karthik.krishnan at kitware.com
Tue May 19 17:50:05 EDT 2009
On Tue, May 19, 2009 at 2:44 PM, Ivan Macia <imacia at vicomtech.org> wrote:
> Hi Brad, Karthik,
>
> Thanks for your help. For now I could give it a try with the
> StreamingImageFilter, I am trying to read/write MetaImage in this case. The
> problem is that we are using UseCompressionOn()
Its very easy to get progress out of tar library (that metaio uses for
compression) and forward that progress as the ImageIO's progress event.
Pretty sure tar reports progress, since I can see it on the command line
every time I use untar, provided by libtar, but I'm not sure. And then you
can patch up your source code.
Of course, the easy solution is the coffee break icon..
> and streaming MetaImage with compression is not supported. I guess I could
> solve this by compressing/decompressing the file myself on the fly. Another
> option is to add a coffee break icon next to the loading message :)
>
> We have already progress report with ImageSeriesReader when we are
> importing DICOM, but the image data for our application is stored as
> MetaImage, which is read as a whole and may take time to read/write
> specially across a network. So it would be nice to improve the progress
> report for future versions in the cases were it is feasible.
>
> Regards
>
> Ivan
>
> 2009/5/19 Karthik Krishnan <karthik.krishnan at kitware.com>
>
> On Tue, May 19, 2009 at 5:33 AM, Iván Macía <imacia at vicomtech.org> wrote:
>>
>>> Dear all,
>>>
>>>
>>>
>>> It seems like itk::ImageFileReader does not report any ProgressEvent. On
>>> the other hand, ImageFileWriter does seem to update progress for each stream
>>> division when NumberOfStreamDivisions is greater than one.
>>>
>>>
>>>
>>> Are there any plans to implement this functionality? It seems like the
>>> main problem is that, in that case, each ImageIO should report its own
>>> progress to inform the ImageFileReader if im not wrong.
>>>
>>
>> That is right. The ImageIO's need to report progress. Generally (unless
>> you are performing a streaming read like Brad mentions below), its hard to
>> do so, since a lot of readers gobble 3D bulk data in one shot. Some progress
>> can still be added, in the sense that you could invoke an event before
>> decompressing, and during unzip / untar, since these libraries support
>> progress. But the ImageIO should do it and none of them do.
>>
>
>> FYI: You do get progress with the ImageSeriesReader (each time you finish
>> reading another slice) which is the most common use case for us here, in
>> that we can report progress reading a stack of DICOM files.
>>
>> Thanks
>> --
>> karthik
>>
>>>
>>>
>>> In general, these operations don’t take too much time but there are cases
>>> in which it takes considerable time and I would like to inform users of my
>>> application about the progress of the operation, for example when the file
>>> is being read directly from another place the network.
>>>
>>>
>>>
>>> Thanks in advance
>>>
>>>
>>>
>>> Ivan
>>>
>>>
>>>
>>> --
>>> Iván Macía Oliver
>>> Investigador / Ikertzailea / Researcher
>>> Departamento de Aplicaciones Biomédicas - Aplikazio Biomedikoaren Alorra
>>> - Biomedical Applications
>>> VICOMTech - Visual Interaction and Communication Technologies Center
>>> Mikeletegi Pasealekua, 57 - Parque Tecnológico
>>> E-20009 Donostia - San Sebastián, Spain
>>> Tel: +[34] 943 30 92 30
>>> Fax: +[34] 943 30 93 93
>>> e-mail: imacia at vicomtech.org <lkabongo at vicomtech.org>
>>> http://www.vicomtech.org
>>>
>>> *** member of INI-GraphicsNet ****
>>> http://www.inigraphics.net
>>> *** member of IK4 Research Alliance ****
>>> http://www.ik4.es
>>>
>>> ------------------------------------------------------------
>>> VICOMTech is an ISO 9001:2000 certified institute
>>> ------------------------------------------------------------
>>>
>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.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
>>>
>>>
>>
>
--
Karthik Krishnan
R&D Engineer,
Kitware Inc.
Ph: 518 881 4919
Fax: 518 371 4573
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090519/fa829d72/attachment.htm>
More information about the Insight-developers
mailing list