[Dcmlib] RTSTRUCT and RTPlanStorage

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Feb 28 17:52:52 CET 2006


Vincent Daanen wrote:
> hi
> 
> Mathieu, "ne ferais-tu pas un peu de mauvais esprit la ?" ;-)

To be truely honest, I am kind of pushing people out gdcm1.x toward 
gdcm2. But that's another discussion.

> The code below just allows to get all the numerical values from a DS 
> into a std::vector, regarding of the (group, element). I'm not a guru of 
> the dicom file format but I guess DS is
> often use and so, a small method which allows to get the n values of a 
> DS ( n from 3 to ... 200-300 ?) would be, imho, very useful.

Alright then. Now let's do some generic programming. Instead of doing on 
a per DICOM tags, you are asking on a per type basis.

So we need a function per types, right ? Here are the tags:
   "AE",
   "AS",
   "AT",
   "CS",
   "DA",
   "DS",
   "DT",
   "FL",
   "FD",
   "IS",
   "LO",
   "LT",
   "OB",
   "OF",
   "OW",
   "PN",
   "SH",
   "SL",
   "SQ",
   "SS",
   "ST",
   "TM",
   "UI",
   "UL",
   "UN",
   "US",
   "UT",
   "OB or OW",
   "US or SS",
   "US or SS or OW"

So again, if there is something missing, it's in gdcmDataEntry. Maybe an 
operator to std::vector, but types will be a nightmare. I still really 
like the current design where the operations should only be read (from 
file), write (to file), print (cout/cerr). Anything else is application 
oriented and not library oriented IMHO.

> I'm quite sure that in applications that handle dicom files (not only 
> dicom images), there is a method that parses DS into std::vector so why 
> do not add it in gdcm ?

application, you said the word !

> ... and ... you will be be able to read, let's say, ~ 1000 others tags :-P

$ grep DS dicomV3.dic | grep -v "DS 1 " | wc 
 
                  71     504    2817

71 tags, only  :(

Again I might be "mauvais esprit", but I would rather see the code well 
integrated with generic type into gdcm::DataEntry, rather than just 
copy/pasting for an extremely specific app.

Again I am sort of moving out of gdcm1.x partly because of reasons like 
that, where my opinion really differ. So yes I am biased.

Mathieu



More information about the Dcmlib mailing list