[Dcmlib] multiframe streaming

ahmed saad ahmedalysaad2004 at yahoo.com
Mon Aug 20 17:57:41 CEST 2007


Hello Jean,
        I think this is pretty much my problem. we have to read frame-by-frame from the dicom loops and display them as a video in VTK.
 Uncompressed the whole multiframe is not a feasible idea if you want to stream it as a video with real time fps speed (30-50) Hz. Playing the uncompressed files will be rather slow. So we have to do the decompression on the fly.

       Any thoughts ?
Best regards,
Ahmed Saad

----- Original Message ----
From: Jean-Pierre ROUX <jean-pierre.roux at creatis.univ-lyon1.fr>
To: Mathieu Malaterre <mathieu.malaterre at gmail.com>
Cc: ahmed saad <ahmedalysaad2004 at yahoo.com>; dcmlib at creatis.insa-lyon.fr
Sent: Saturday, August 18, 2007 2:55:55 PM
Subject: Re: [Dcmlib] multiframe streaming

At 9:26 +0200 18/08/07, Mathieu Malaterre wrote:

Mathieu,

I think I missed something.
I thought Ahmed's problem was that some multiframes dicom files are 
so huge that they cannot be loaded in memory (I saw CT-Multiframe 
files holding 4000 images, 1024x1024, 16 bits pixels), and he would 
like to perform a frame-by-frame reading, just to display the image.

Am I right, Ahmed?

For uncompressed files, it wouldn't be probabely too difficult to 
write methods like gdcm::FileHelper::ReadFirstFrame(), 
gdcm::FileHelper::ReadNextFrame()

Right now, a frame-by-frame reading is not possible in the general 
case, because, for jpeg compressed files, we cannot be sure that a 
'jpeg fragment' corresponds to a 'frame' (we have some images where 
it doesn't -Mathieu, do you remember the nightmarish CR Philips 
image?-), so, we have to uncompress the whole file before beeing able 
to process it.

Jean-Pierre Roux



>Hi Ahmed,
>
>  That look pretty cool, is this a student project ?
>  My guess is that the easiest solution for you would be to reuse
>ffmpeg approach (GPL license). They divide their code into the codec
>and the file format. For the file format you simply have to use gdcm
>code into the ffmpeg framework. And for the codec, it will depend on
>your code, for mpeg2, reuse the ffmpeg one, for raw image, I am pretty
>sure they have something already.
>  Once this part is done, VTK CVS has a ffmpeg bridge, so this part
>should be transparent (hopefully).
>
>  Subscribe to ffmpeg mailing list and start from there. There code
>base is very readable (if you skip all the crazy optimization
>details).
>
>HTH
>-Mathieu
>
>On 8/18/07, ahmed saad <ahmedalysaad2004 at yahoo.com> wrote:
> >
> > Hello,
> >     I'm new to GDCM from VTK/ITK background. I would like to implement a
> > simple multi-frame dicom viewer so you can play it as a video (e.g. for
> > cardiology applications).
> >     Multi-frame dicom loops might be large. So a streaming frames on demand
> > might be a solution instead of loading the whole loop on memory.
> >     Is there any hint to do that in GDCM and vtk.
> > Best regards,
> > Ahmed
> >
> >  ________________________________
> > Shape Yahoo! in your own image. Join our Network Research Panel today!
> > _______________________________________________
> > Dcmlib mailing list
> > Dcmlib at creatis.insa-lyon.fr
> > http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib
> >
>
>
>--
>Mathieu
>_______________________________________________
>Dcmlib mailing list
>Dcmlib at creatis.insa-lyon.fr
>http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib

   Jean-Pierre ROUX
   CREATIS - CNRS UMR 5220, INSERM U 630
   Laboratoire de Radiologie Experimentale
   Hopital Cardiologique
   28 Avenue du Doyen LEPINE
   B.P. Lyon-Montchat
   69394 Lyon Cedex 03
 
   Tel      : (+33) 04 72 35 74 12
   Fax      : (+33) 04 72 68 49 16
   URL      : http://www.creatis.univ-lyon1.fr
   e-mail   : jpr at creatis.univ-lyon1.fr/~jpr
                                   







       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's 
Comedy with an Edge to see what's on, when. 
http://tv.yahoo.com/collections/222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/dcmlib/attachments/20070820/6246a2a8/attachment.html>


More information about the Dcmlib mailing list