Program: gdcm
Module: $RCSfile: TestBuildUpDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:30 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2006/04/11 16:05:03 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
std::cerr << "Usage: " << argv[0] << " dummy " << std::endl;
}
-
+
+ //gdcm::Debug::DebugOn();
+
bool errorFound = false;
gdcm::DicomDir *dcmdir;
std::string dirName;
s11 = p1->NewStudy();
s11->SetEntryString("StudyDescrOne.One_",0x0008, 0x1030);
// we know entry (0008,1060) is not yet created
- s11->InsertEntryString("Dr Mabuse", 0x0008, 0x1060);
+ s11->InsertEntryString("Dr^Mabuse", 0x0008, 0x1060, "PN");
// fill here other Study characteristics
gdcm::DicomDirStudy *s12 = p1->NewStudy();
s12->SetEntryString("StudyDescrOne.Two",0x0008, 0x1030);
- s12->InsertEntryString("Dr Zorglub", 0x0008, 0x1060);
+ s12->InsertEntryString("Dr^Zorglub", 0x0008, 0x1060, "PN");
// fill here other Study characteristics
gdcm::DicomDirStudy *s13 = p1->NewStudy();
s13->SetEntryString("StudyDescrOne.Tree",0x0008, 0x1030);
- s13->InsertEntryString("Dr Follamour", 0x0008, 0x1060);
+ s13->InsertEntryString("Dr^Follamour", 0x0008, 0x1060, "PN");
// fill here other Study characteristics
gdcm::DicomDirSerie *s111;
<< "]" << std::endl;
valueStuff = s11->GetEntryString(0x0008, 0x1060);
- if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr Mabuse") )
+std::cout << "----------------length-----------------" << valueStuff.length() <<
+std::endl;
+ if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr^Mabuse") )
{
std::cout << "2 : 0x0008,0x1060 ["
<< s11->GetEntryString(0x0008,0x1060)
errorFound = true;
break;
}
- std::cout << "Pysician : ["
+ std::cout << "Physician : ["
<< valueStuff
<< "]" << std::endl;
if ( (s12 = p1->GetNextStudy()) == 0 )
<< "]" << std::endl;
if ( gdcm::Util::DicomStringEqual(s12->GetEntryString(0x0008,
- 0x1060),"Dr Zorglub " ))
+ 0x1060),"Dr^Zorglub " ))
{
std::cout << "4 0x0008,0x1060 ["
<< s12->GetEntryString(0x0008,0x1060)
errorFound = true;
break;
}
- std::cout << "Pysician : ["
+ std::cout << "___________________________________" << std::endl;
+ std::cout << "Pysician Reading Study: ["
<< s12->GetEntryString(0x0008,0x1060)
<< "]" << std::endl;
<< "]" << std::endl;
valueStuff = s13->GetEntryString(0x0008, 0x1060);
- if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr Follamour") )
+ if (!gdcm::Util::DicomStringEqual(valueStuff, "Dr^Follamour") )
{
std::cout << "5 0x0008,0x1060 ["
<< valueStuff
Program: gdcm
Module: $RCSfile: TestCopyRescaleDicom.cxx,v $
Language: C++
- Date: $Date: 2005/10/18 08:35:46 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2006/04/11 16:05:03 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
if( bitsStored == "16" )
{
std::cout << "Rescale...";
- copyF.InsertEntryString( "8", 0x0028, 0x0100); // Bits Allocated
- copyF.InsertEntryString( "8", 0x0028, 0x0101); // Bits Stored
- copyF.InsertEntryString( "7", 0x0028, 0x0102); // High Bit
- copyF.InsertEntryString( "0", 0x0028, 0x0103); // Pixel Representation
+ copyF.InsertEntryString( "8", 0x0028, 0x0100, "US"); // Bits Allocated
+ copyF.InsertEntryString( "8", 0x0028, 0x0101, "US"); // Bits Stored
+ copyF.InsertEntryString( "7", 0x0028, 0x0102, "US"); // High Bit
+ copyF.InsertEntryString( "0", 0x0028, 0x0103, "US"); // Pixel Representation
// We assume the value were from 0 to uint16_t max
rescaleSize = dataSize / 2;
Program: gdcm
Module: $RCSfile: TestImageSet.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:31 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2006/04/11 16:05:03 $
+ Version: $Revision: 1.7 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
std::ostringstream str;
// Set the image size
- file->InsertEntryString("256",0x0028,0x0011); // Columns
- file->InsertEntryString("256",0x0028,0x0010); // Rows
+ file->InsertEntryString("256",0x0028,0x0011,"US"); // Columns
+ file->InsertEntryString("256",0x0028,0x0010,"US"); // Rows
// Set the pixel type
- file->InsertEntryString("8",0x0028,0x0100); // Bits Allocated
- file->InsertEntryString("8",0x0028,0x0101); // Bits Stored
- file->InsertEntryString("7",0x0028,0x0102); // High Bit
+ file->InsertEntryString("8",0x0028,0x0100,"US"); // Bits Allocated
+ file->InsertEntryString("8",0x0028,0x0101,"US"); // Bits Stored
+ file->InsertEntryString("7",0x0028,0x0102,"US"); // High Bit
// Set the pixel representation
- file->InsertEntryString("0",0x0028,0x0103); // Pixel Representation
+ file->InsertEntryString("0",0x0028,0x0103,"US"); // Pixel Representation
// Set the samples per pixel
- file->InsertEntryString("1",0x0028,0x0002); // Samples per Pixel
+ file->InsertEntryString("1",0x0028,0x0002,"US"); // Samples per Pixel
// The so called 'prepared image', built ex nihilo just before,
// has NO Pixel Element yet.
// It's up to the user to initialize Serie UID and Study UID
// Study Instance UID
studyUID = gdcm::Util::CreateUniqueUID();
- file->InsertEntryString(studyUID, 0x0020, 0x000d);
+ file->InsertEntryString(studyUID, 0x0020, 0x000d, "UI");
// Series Instance UID
serieUID = gdcm::Util::CreateUniqueUID();
- file->InsertEntryString(serieUID, 0x0020, 0x000e);
+ file->InsertEntryString(serieUID, 0x0020, 0x000e, "UI");
newFile = WriteImage(file, fileName.str());
if( !newFile )
std::ostringstream fileName;
fileName << "FileSeq" << i << ".dcm";
file = gdcm::File::New();
- file->InsertEntryString(studyUID, 0x0020, 0x000d);
- file->InsertEntryString(serieUID, 0x0020, 0x000e);
+ file->InsertEntryString(studyUID, 0x0020, 0x000d, "UI");
+ file->InsertEntryString(serieUID, 0x0020, 0x000e, "UI");
newFile = WriteImage(file, fileName.str());
if( !newFile )
std::ostringstream fileName;
fileName << "FileSeq" << i << ".dcm";
file = gdcm::File::New();
- file->InsertEntryString(studyUID, 0x0020, 0x000d);
+ file->InsertEntryString(studyUID, 0x0020, 0x000d, "UI");
serieUID = gdcm::Util::CreateUniqueUID();
- file->InsertEntryString(serieUID, 0x0020, 0x000e);
+ file->InsertEntryString(serieUID, 0x0020, 0x000e, "UI");
newFile = WriteImage(file, fileName.str());
if( !newFile )
{
Program: gdcm
Module: $RCSfile: TestMakeIcon.cxx,v $
Language: C++
- Date: $Date: 2005/10/25 14:52:31 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2006/04/11 16:05:03 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
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->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,"OW");
sqi->InsertEntryBinArea( pixels, lgth, 0x7fe0,0x0010);
// 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);
Program: gdcm
Module: $RCSfile: TestWriteSimple.cxx,v $
Language: C++
- Date: $Date: 2006/04/07 14:15:56 $
- Version: $Revision: 1.48 $
+ Date: $Date: 2006/04/11 16:05:03 $
+ Version: $Revision: 1.49 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// Set the image size
str.str("");
str << img.sizeX;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0011); // Columns
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0011,"US"); // Columns
str.str("");
str << img.sizeY;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0010); // Rows
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0010,"US"); // Rows
if(img.sizeZ>1)
{
str.str("");
str << img.sizeZ;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0008); // Number of Frames
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0008, "IS"); // Number of Frames
}
fileName << "-" << img.sizeX << "-" << img.sizeY << "-" << img.sizeZ;
// Set the pixel type
str.str("");
str << img.componentSize;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0100); // Bits Allocated
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0100,"US"); // Bits Allocated
str.str("");
str << img.componentUse;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0101); // Bits Stored
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0101,"US"); // Bits Stored
str.str("");
str << ( img.componentSize - 1 );
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0102); // High Bit
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0102,"US"); // High Bit
// Set the pixel representation
str.str("");
str << img.sign;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0103); // Pixel Representation
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0103, "US"); // Pixel Representation
fileName << "-" << img.componentSize;
if(img.sign == 0)
// Set the samples per pixel
str.str("");
str << img.components;
- fileToBuild->InsertEntryString(str.str(),0x0028,0x0002); // Samples per Pixel
+ fileToBuild->InsertEntryString(str.str(),0x0028,0x0002, "US"); // Samples per Pixel
// Step 2 : Create the output image
std::cout << "2...";