<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Pour TestCopyDicom.cxx voici un petit patch qui
devrait regler l'affaire:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><A
href="mailto:rouet@vanoise:~/src/gdcm/Test$">rouet@vanoise:~/src/gdcm/Test$</A>
cvs diff -u TestCopyDicom.cxx<BR>Index:
TestCopyDicom.cxx<BR>===================================================================<BR>RCS
file: /cvs/public/gdcm/Test/TestCopyDicom.cxx,v<BR>retrieving revision
1.16<BR>diff -u -r1.16 TestCopyDicom.cxx<BR>--- TestCopyDicom.cxx 16
Nov 2004 04:28:20 -0000 1.16<BR>+++
TestCopyDicom.cxx 16 Nov 2004 20:51:07 -0000<BR>@@ -91,6 +91,7
@@<BR> size_t dataSize =
original->GetImageDataSize();<BR>
uint8_t* imageData = original->GetImageData();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>+<BR> //First
of all copy the header field by field</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> // Warning
:Accessor gdcmElementSet::GetEntry() should not exist<BR>@@ -105,8 +106,13
@@<BR> d =
tag->second;<BR> if (
gdcm::BinEntry* b = dynamic_cast<gdcm::BinEntry*>(d)
)<BR>
{<BR>+
uint8_t* copybin = new
uint8_t[b->GetLength()];<BR>+
if
(b->GetBinArea())<BR>+
memcpy(copybin,b->GetBinArea(),
b->GetLength());<BR>+
else<BR>+
copybin =
0;<BR>
copy->GetHeader()->ReplaceOrCreateByNumber(<BR>-
b->GetBinArea(),<BR>+
copybin,<BR>
b->GetLength(),<BR>
b->GetGroup(),<BR>
b->GetElement(),<BR>@@ -130,7 +136,6
@@<BR>
}<BR> }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-
copy->SetImageData(imageData,
dataSize);<BR>
original->GetHeader()->SetImageDataSize(dataSize);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
copy->WriteDcmExplVR( output );<BR>@@ -147,6 +152,7
@@<BR> std::cout <<
output << " Failed" <<
std::endl;<BR>
}<BR>
i++;<BR>+ delete copy;<BR>
}<BR> return retVal;<BR> }</FONT></DIV></BODY></HTML>