1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*
*/
#include "gdcmDefs.h"
#include "gdcmUIDs.h"
#include "gdcmGlobal.h"
#include "gdcmMediaStorage.h"
#include "gdcmSOPClassUIDToIOD.h"
int main(int , char *[])
{
using gdcm::MediaStorage;
gdcm::Global& g = gdcm::Global::GetInstance();
if( !g.LoadResourcesFiles() )
{
std::cerr << "Could not LoadResourcesFiles" << std::endl;
return 1;
}
const gdcm::Defs &defs = g.GetDefs();
int ret = 0;
//std::cout << "Table B.5-1 STANDARD SOP CLASSES" << std::endl;
std::cout << "SOP Class Name,SOP Class UID,IOD Specification (defined in PS 3.3)" << std::endl;
gdcm::MediaStorage::MSType mst;
for ( mst = gdcm::MediaStorage::MediaStorageDirectoryStorage; mst < gdcm::MediaStorage::MS_END;
mst = (gdcm::MediaStorage::MSType)(mst + 1) )
{
const char *iod = defs.GetIODNameFromMediaStorage(mst);
gdcm::UIDs uid;
uid.SetFromUID( gdcm::MediaStorage::GetMSString(mst) /*mst.GetString()*/ );
if( iod )
{
const char *iod_ref = gdcm::SOPClassUIDToIOD::GetIOD(uid);
if( iod_ref )
{
std::string iod_ref_str = iod_ref;
//iod_ref_str += " IOD Modules";
//if( iod_ref_str != iod )
{
//std::cout << "UID: " << uid << " ";
std::cout << '"' << uid.GetName() << '"' <<"," << '"' <<uid.GetString() << '"' <<"," << '"' <<iod << '"' << std::endl;
//std::cout << "Incompatible IODs: [" << iod << "] versus ref= [" << iod_ref_str << "]" << std::endl;
++ret;
}
}
}
}
return 0;
}
|