[Dcmlib] multiframe streaming

Jean-Pierre ROUX jean-pierre.roux at creatis.insa-lyon.fr
Sat Aug 18 23:55:55 CEST 2007


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
								   



More information about the Dcmlib mailing list