Program: gdcm
Module: $RCSfile: TestCopyDicom.cxx,v $
Language: C++
- Date: $Date: 2004/11/25 10:24:33 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2005/01/06 14:49:15 $
+ Version: $Revision: 1.27 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmHeader.h"
#include "gdcmFile.h"
-#include "gdcmDocument.h"
#include "gdcmValEntry.h"
#include "gdcmBinEntry.h"
//////////////// Step 1:
std::cout << " 1...";
gdcm::Header *originalH = new gdcm::Header( filename );
- gdcm::Header *copyH = new gdcm::Header( output );
+ gdcm::Header *copyH = new gdcm::Header( );
//First of all copy the header field by field
else
{
// We skip pb of SQ recursive exploration
- //std::cout << "Skipped Sequence "
- // << "------------- " << d->GetVR() << " "<< std::hex
- // << d->GetGroup() << " " << d->GetElement()
- // << std::endl;
}
d=originalH->GetNextEntry();
// Useless to set the image datas, because it's already made when
// copying the corresponding BinEntry that contains the pixel datas
copy->SetImageData(imageData, dataSize);
-// copy->GetImageData();
-// original->GetHeader()->SetImageDataSize(dataSize);
//////////////// Step 3:
std::cout << "3...";
if( !copy->WriteDcmExplVR(output) )
{
std::cout << " Failed" << std::endl
- << " " << output << " not written" << std::endl;
+ << " " << output << " not written" << std::endl;
delete original;
delete copy;