X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestMakeIcon.cxx;h=e7aa034ce6b626b8019674b3548714d621cd8154;hb=55515b05da6434fd0c5ae71daa9eb785519a8fac;hp=678f8930118639a3d7b53af3c47a316ed8ff7797;hpb=6b51b22366f878e1050c75a6ebb755bd2ff365c7;p=gdcm.git diff --git a/Testing/TestMakeIcon.cxx b/Testing/TestMakeIcon.cxx index 678f8930..e7aa034c 100644 --- a/Testing/TestMakeIcon.cxx +++ b/Testing/TestMakeIcon.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestMakeIcon.cxx,v $ Language: C++ - Date: $Date: 2005/10/25 14:52:31 $ - Version: $Revision: 1.10 $ + 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 @@ -35,7 +35,7 @@ int TestMakeIcon (int argc, char *argv[]) std::string output = "testIcon.dcm"; - gdcm::Debug::DebugOn(); + GDCM_NAME_SPACE::Debug::DebugOn(); if ( argc == 3 ) { @@ -48,7 +48,7 @@ int TestMakeIcon (int argc, char *argv[]) << " 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( ); @@ -58,38 +58,38 @@ int TestMakeIcon (int argc, char *argv[]) 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 uint16_t binVal[3]={0x52f7,0xf358,0xad9b}; - sqi->InsertEntryString( "MONOCHROME2", 0x0028,0x0004); - sqi->InsertEntryString( "128", 0x0028,0x0010); - sqi->InsertEntryString( "8", 0x0028,0x0100); - sqi->InsertEntryString( "8", 0x0028,0x0101); - sqi->InsertEntryString( "7", 0x0028,0x0102); - sqi->InsertEntryString( "0", 0x0028,0x0103); - sqi->InsertEntryBinArea( (uint8_t *)binVal, 3*2, 0x0005,0x0010,"OW"); - sqi->InsertEntryBinArea( pixels, lgth, 0x7fe0,0x0010); + sqi->InsertEntryString( "MONOCHROME2", 0x0028,0x0004, "CS"); + sqi->InsertEntryString( "128", 0x0028,0x0010, "US"); + sqi->InsertEntryString( "8", 0x0028,0x0100, "US"); + 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,"OB"); + sqi->InsertEntryBinArea( pixels, lgth, 0x7fe0,0x0010,"OB"); // just to see if it's stored a the right place - sqi->InsertEntryString( "128", 0x0028,0x0011); + sqi->InsertEntryString( "128", 0x0028,0x0011, "US"); fh->WriteDcmExplVR(output); f->Delete(); fh->Delete(); - f = gdcm::File::New(); + f = GDCM_NAME_SPACE::File::New(); f->SetFileName(output); f->Load(); f->Print();