UN Unknown; // Any length of bytes
US Unsigned Short; // Exactly 2 bytes
UT Unlimited Text; // At most 2^32 -1 chars
-
Program: gdcm
Module: $RCSfile: TestVR.cxx,v $
Language: C++
- Date: $Date: 2005/10/20 15:05:15 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2005/10/21 08:28:02 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
=========================================================================*/
#include "gdcmVR.h"
+#include "gdcmDebug.h"
int TestVR(int , char *[])
{
int error = 0;
gdcm::VR *vr = new gdcm::VR();
+ gdcm::Debug::DebugOn();
+
// There should be 16 entries ...
vr->Print( std::cout );
}
if( vr->IsValidVR( "\000/" ) )
{
- std::cerr << "'\000/' is a valid VR" << std::endl;
+ std::cerr << "' /' is a valid VR" << std::endl;
error++;
}
if( vr->IsValidVR( gdcm::GDCM_VRUNKNOWN ) )
Program: gdcm
Module: $RCSfile: gdcmVR.cxx,v $
Language: C++
- Date: $Date: 2005/10/20 14:45:11 $
- Version: $Revision: 1.44 $
+ Date: $Date: 2005/10/21 08:28:03 $
+ Version: $Revision: 1.45 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include <fstream>
#include <iostream>
+#include <string.h>
namespace gdcm
{
std::ifstream from(filename.c_str());
if ( !from )
{
- gdcmWarningMacro("Can't open dictionary" << filename.c_str());
+ gdcmWarningMacro("Can't open dictionary " << filename.c_str());
FillDefaultVRDict(vr);
}
else
{
from >> std::ws;
from.getline(buff, 1024, ' ');
+ if( strcmp(buff,"") == 0)
+ continue;
+
key = buff;
from >> std::ws;
from.getline(buff, 1024, ';');
from >> std::ws;
from.getline(buff, 1024, '\n');
- if ( key != "" )
- {
- vr[key] = name;
- }
+ vr[key] = name;
}
from.close();
}