<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I clemens,<br>
<br>
I think you just have to add the following line before writing anything
:<br>
<br>
fh->GetImageData();<br>
<br>
This will actually load the image data into memory wo you can write it.<br>
<br>
Best<br>
<br>
Emmanuel<br>
<br>
Clemens Hentschke a écrit :
<blockquote cite="mid966383156@web.de" type="cite">
  <pre wrap="">Hello,

i have a DICOM and just want to convert this into a image-raw-format (without image header), just the pixel-values as they are in the dicom. 

My code is:
file = gdcm::File::New( );
   file->SetLoadMode ( gdcm::LD_ALL );
   file->SetFileName("test.dcm");

   bool res = file->Load();   
   if (!res) {
       std::cerr << "Sorry, " << " not a gdcm-readable " << "DICOM / ACR File" << std::endl;
       file->Delete();
       return -1;
   }
 gdcm::FileHelper *fh = gdcm::FileHelper::New(file);
  fh->SetWriteModeToRaw();
  fh->WriteRawData("Neu.IMG");
 but there is always the error: Error: In /usr/gdcm/src/gdcmFileHelper.cxx, line 603, function bool gdcm::FileHelper::WriteRawData(const std::string&)
Nothing written.

where is my error? I have the cvs version of gdcm, downloaded about two weeks ago
Thanks
   -Clemens

______________________________________________________________________________
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: <a class="moz-txt-link-abbreviated" href="http://www.deutschlandsegelt.de">www.deutschlandsegelt.de</a>
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!


_______________________________________________
Dcmlib mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dcmlib@creatis.insa-lyon.fr">Dcmlib@creatis.insa-lyon.fr</a>
<a class="moz-txt-link-freetext" href="http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib">http://www.creatis.insa-lyon.fr/mailman/listinfo/dcmlib</a>
  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div style="font-family: sans;">Emmanuel OLART, IT Manager<br>
<b>THERALYS</b><br>
Diagnostic & Therapeutic Image Analysis in Clinical Trials
<br>
<br>
Address : Bioparc, 60 av. Rockefeller, 69008 Lyon, France<br>
+33 (0)4 26 23 05 05 (Phone)<br>
+33 (0)4 26 23 05 06 (Fax)<br>
Email : <a href="mailto:eolart@theralys.com">eolart@theralys.com</a><br>
<a href="http://www.theralys.com/" title="Theralys.com"><img
 src="cid:part1.05050409.03080604@theralys.com" alt="THERALYS"
 title="THERALYS" border="0" height="24" width="150"></a>
</div>
</div>
</body>
</html>