[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dicom support
From: |
Judd Storrs |
Subject: |
Re: dicom support |
Date: |
Sun, 2 May 2010 21:04:55 -0400 |
I've been playing with gdcm and I can't figure out how to supersede or
replace the builtin compile-time dictionaries to use keywords instead
of names. Maybe the best approach is to keep a separate table of keys
and names used by the octave interface? Maybe something along these
lines:
#include "gdcmGlobal.h"
#include "gdcmDict.h"
#include <string>
#include <map>
static std::map<gdcm::Tag, std::string> tagdict ;
static std::map<std::string, gdcm::Tag> keydict ;
void
set_keyword (gdcm::Tag tag, std::string keyword)
{
keydict[keyword] = tag ;
tagdict[tag] = keyword ;
}
int main( int argc, char* argv[] )
{
// Actually populate by reading a file
set_keyword ( gdcm::Tag(0x0010, 0x0010), "PatientName" );
gdcm::Tag t = gdcm::Tag(0x0010, 0x0010) ;
std::string k = "PatientName" ;
std::cout << t << " -> " << tagdict[t] << std::endl ;
std::cout << k << " -> " << keydict[k] << std::endl ;
return 0;
}
--judd
- dicom support, Andy Buckle, 2010/05/02
- Re: dicom support, Judd Storrs, 2010/05/02
- Re: dicom support, Judd Storrs, 2010/05/02
- Re: dicom support, Andy Buckle, 2010/05/02
- Re: dicom support, Judd Storrs, 2010/05/02
- Re: dicom support,
Judd Storrs <=
- Re: dicom support, Andy Buckle, 2010/05/03
- Message not available
- Re: dicom support, Judd Storrs, 2010/05/03
- Re: dicom support, Andy Buckle, 2010/05/03
- Re: dicom support, Søren Hauberg, 2010/05/03