<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Hello Jean,<br>        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.<br> 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.<br><br>       Any thoughts ?<br>Best regards,<br>Ahmed Saad<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Jean-Pierre ROUX <jean-pierre.roux@creatis.univ-lyon1.fr><br>To: Mathieu
 Malaterre <mathieu.malaterre@gmail.com><br>Cc: ahmed saad <ahmedalysaad2004@yahoo.com>; dcmlib@creatis.insa-lyon.fr<br>Sent: Saturday, August 18, 2007 2:55:55 PM<br>Subject: Re: [Dcmlib] multiframe streaming<br><br><div>At 9:26 +0200 18/08/07, Mathieu Malaterre wrote:<br><br>Mathieu,<br><br>I think I missed something.<br>I thought Ahmed's problem was that some multiframes dicom files are <br>so huge that they cannot be loaded in memory (I saw CT-Multiframe <br>files holding 4000 images, 1024x1024, 16 bits pixels), and he would <br>like to perform a frame-by-frame reading, just to display the image.<br><br>Am I right, Ahmed?<br><br>For uncompressed files, it wouldn't be probabely too difficult to <br>write methods like gdcm::FileHelper::ReadFirstFrame(), <br>gdcm::FileHelper::ReadNextFrame()<br><br>Right now, a frame-by-frame reading is not possible in the general <br>case, because, for jpeg compressed files, we cannot be sure that a
 <br>'jpeg fragment' corresponds to a 'frame' (we have some images where <br>it doesn't -Mathieu, do you remember the nightmarish CR Philips <br>image?-), so, we have to uncompress the whole file before beeing able <br>to process it.<br><br>Jean-Pierre Roux<br><br><br><br>>Hi Ahmed,<br>><br>>  That look pretty cool, is this a student project ?<br>>  My guess is that the easiest solution for you would be to reuse<br>>ffmpeg approach (GPL license). They divide their code into the codec<br>>and the file format. For the file format you simply have to use gdcm<br>>code into the ffmpeg framework. And for the codec, it will depend on<br>>your code, for mpeg2, reuse the ffmpeg one, for raw image, I am pretty<br>>sure they have something already.<br>>  Once this part is done, VTK CVS has a ffmpeg bridge, so this part<br>>should be transparent (hopefully).<br>><br>>  Subscribe to ffmpeg
 mailing list and start from there. There code<br>>base is very readable (if you skip all the crazy optimization<br>>details).<br>><br>>HTH<br>>-Mathieu<br>><br>>On 8/18/07, ahmed saad <ahmedalysaad2004@yahoo.com> wrote:<br>> ><br>> > Hello,<br>> >     I'm new to GDCM from VTK/ITK background. I would like to implement a<br>> > simple multi-frame dicom viewer so you can play it as a video (e.g. for<br>> > cardiology applications).<br>> >     Multi-frame dicom loops might be large. So a streaming frames on demand<br>> > might be a solution instead of loading the whole loop on memory.<br>> >     Is there any hint to do that in GDCM and vtk.<br>> > Best regards,<br>> > Ahmed<br>> ><br>> >  ________________________________<br>> > Shape Yahoo! in your own image. Join our Network Research
 Panel today!<br>> > _______________________________________________<br>> > Dcmlib mailing list<br>> > Dcmlib@creatis.insa-lyon.fr<br>> > <a target="_blank" href="http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib">http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib</a><br>> ><br>><br>><br>>--<br>>Mathieu<br>>_______________________________________________<br>>Dcmlib mailing list<br>>Dcmlib@creatis.insa-lyon.fr<br>><a target="_blank" href="http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib">http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib</a><br><br>   Jean-Pierre ROUX<br>   CREATIS - CNRS UMR 5220, INSERM U 630<br>   Laboratoire de Radiologie Experimentale<br>   Hopital Cardiologique<br>   28 Avenue du Doyen LEPINE<br>   B.P. Lyon-Montchat<br>   69394 Lyon Cedex 03<br> <br>  
 Tel      : (+33) 04 72 35 74 12<br>   Fax      : (+33) 04 72 68 49 16<br>   URL      : <a target="_blank" href="http://www.creatis.univ-lyon1.fr">http://www.creatis.univ-lyon1.fr</a><br>   e-mail   : jpr@creatis.univ-lyon1.fr/~jpr<br>                                   <br></div></div><br></div></div><br>
      <hr size=1>Luggage? GPS? Comic books? <br>
Check out fitting <a href="http://us.rd.yahoo.com/evt=48249/*http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz"> gifts for grads</a> at Yahoo! Search.</body></html>