Program: gdcm
Module: $RCSfile: TestMakeIcon.cxx,v $
Language: C++
- Date: $Date: 2006/04/11 16:05:03 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2007/08/29 15:56:41 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::string output = "testIcon.dcm";
- gdcm::Debug::DebugOn();
+ GDCM_NAME_SPACE::Debug::DebugOn();
if ( argc == 3 )
{
<< " input filename.dcm output Filename.dcm" << std::endl;
}
- gdcm::File *f = gdcm::File::New( );
+ GDCM_NAME_SPACE::File *f = GDCM_NAME_SPACE::File::New( );
f->SetFileName( input );
f->Load( );
f->Delete();
return 1;
}
- gdcm::FileHelper *fh = gdcm::FileHelper::New(f);
+ GDCM_NAME_SPACE::FileHelper *fh = GDCM_NAME_SPACE::FileHelper::New(f);
uint8_t *pixels = fh->GetImageData();
uint32_t lgth = fh->GetImageDataSize();
- gdcm::SeqEntry *icon = f->InsertSeqEntry(0x0088, 0x0200);
- gdcm::SQItem *sqi = gdcm::SQItem::New(1);
+ GDCM_NAME_SPACE::SeqEntry *icon = f->InsertSeqEntry(0x0088, 0x0200);
+ GDCM_NAME_SPACE::SQItem *sqi = GDCM_NAME_SPACE::SQItem::New(1);
icon->AddSQItem(sqi, 1);
sqi->Delete();
- // icone is just define like the image
+ // icone is just defined like the image
// The purpose is NOT to imagine an icon,
// just check the stuff works
sqi->InsertEntryString( "8", 0x0028,0x0101, "US");
sqi->InsertEntryString( "7", 0x0028,0x0102, "US");
sqi->InsertEntryString( "0", 0x0028,0x0103, "US");
- sqi->InsertEntryBinArea( (uint8_t *)binVal, 3*2, 0x0005,0x0010,"OW");
- sqi->InsertEntryBinArea( pixels, lgth, 0x7fe0,0x0010);
+ sqi->InsertEntryBinArea( (uint8_t *)binVal, 3*2, 0x0005,0x0010,"OB");
+ sqi->InsertEntryBinArea( pixels, lgth, 0x7fe0,0x0010,"OB");
// just to see if it's stored a the right place
sqi->InsertEntryString( "128", 0x0028,0x0011, "US");
f->Delete();
fh->Delete();
- f = gdcm::File::New();
+ f = GDCM_NAME_SPACE::File::New();
f->SetFileName(output);
f->Load();
f->Print();