1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <META http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
5 <TITLE>Gdcm News</TITLE>
11 <!--#######################################################################-->
12 <H1>Gdcm News</a></H1>
14 <!--#######################################################################-->
16 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
18 <A CLASS="anchor" NAME="missing">
19 <B>Missing features</B></A>
21 We know the following are missing; don't loose time looking for them ...<br>
22 We know they could be helpfull. We shall add them some day.<br>
23 Any contribution is welcome.
27 <LI> gdcm doesn't read yet <TT>JPEG-LS</TT> encoded files.
29 We said '<TT>JPEG-LS</TT>', not Lossless Jpeg ...<br>
30 [<TT>JPEG-LS</TT> is the basis for new lossless/near-lossless compression
31 standard for continuous-tone images intended for <TT>JPEG2000</TT>.
32 The standard is based on the LOCO-I algorithm
33 (LOw COmplexity LOssless COmpression for Images)
34 developed at Hewlett-Packard Laboratories]
36 <LI> gdcm doesn't read yet all <TT>JPEG2000</TT> encoded files.
38 But we are working on it (a lot of troubles with Jasper).
40 <LI> gdcm doesn't read yet <TT>MPEG2</TT> encoded files.
45 <LI> Allow user to tell <TT>gdcm::Document</TT> constructor he just wants
46 to load a given list of <TT>DocEntries</TT>
47 (to save CPU time and RAM space)
48 <LI> Allow 'frame by frame' reading (should be helpfull for huge
50 <LI> Allow subvolume selection / frames selection before reading.
51 <LI> Expose Read/Decompression mechanisms to allow user getting
52 information from <tt>DICOMDIR</TT> <br> -or from his own Data Base-
53 and reading his images without parsing
54 the header, one more time.
58 <LI> Allow user to tell the Writer he doesn't want to write down
59 <TT>SeqEntry</TT> (if any)
60 <LI> Allow user to tell the Writer he doesn't want to write down
61 <TT>Shadow groups</TT> (if any)
62 <LI> Allow user to tell the Writer which compression mode he wants<br>
63 (Right now, no one is available)
64 <LI> Allow user to tell the Writer he wants to split a
65 <TT>Multiframe</TT> image into a serie of
66 <TT>Single frame</TT> images.
67 <LI> Allow user to tell the Writer he wants to agregate a
68 Serie of <TT>Single frame</TT> images into a
69 <TT>Multiframe</TT> image.
73 <LI> Full <TT>Icon Image</TT> management (Read and Write)
74 <LI> Full <TT>Overlays</TT> management (Read and Write) <br>
75 both for '<TT>ACR-NEMA</TT> style' (using groups <TT>0x6000</TT>
76 and nexts) and '<TT>DICOM V3</TT> style' (using Sequences)
78 <LI> <TT>DICOMDIR</TT>
80 <LI> <TT>DICOMDIR</TT> full management (not limited to
81 <TT> PATIENT</TT>/<TT>STUDY</TT>/<TT>SERIE</TT>/<TT>IMAGE</TT>)
82 <LI> Allow user to add an entry (belonging to the file header Dicom
83 entries)to the default entry list, before
84 making a <TT>DICOMDIR</TT> from a root directory
85 <LI> Allow user to add an entry of his owns (for instance an <TT>Icon</TT>
86 to each image, or to each Serie).
91 <LI> An accurate <TT>SerieHelper</TT> <br>
92 Right now <TT>SerieHelper</TT> only works on 'bona fide Series', and
93 breaks on wrongly forged Series.<br>
94 We are still looking for any heuristics...
95 <LI> A <TT>SerieHelper</TT> that would use the <TT>DICOMDIR</TT> (if any)
96 instead of parsing all the files within the Root Directory
100 <LI> 16-bits-LUT full Management
101 <LI> User friendly management of <TT>Rescale Slope</TT> and
102 <TT>Rescale Intercept</TT>
103 <LI> Allow parsing the <TT>Shadow groups</TT> against a user supplied
104 private <TT>Dicom Dictionary</TT> (pfff!...)
107 <!#######################################################################>
108 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
110 <A CLASS="anchor" NAME="NewsCurrentVersion">
111 <B>Current Version</B></A>
119 <a href="uml-gdcm.pdf">gdcm UML Class Diagram</a> current version.
122 <LI> <A HREF="News.html#missing">Missing Features</a>
126 (Not a great one ...)
127 Stupid method names : <br><TT>DicomDir::WriteDicomDir()</TT>
128 and <TT>DicomDir::AnonymizeDicomDir()</TT> <br>replaced by : <br>
129 <TT>DicomDir::Write()</TT>
130 and <TT>DicomDir::Anonymize()</TT>
133 void Document::AddForceLoadElement(uint16_t group, uint16_t elem);
135 allows user to tell <TT>gdcm::Document</TT> Loader he wants
136 to force the loading of a given set of <TT>DocEntries</TT>,
137 even if their length exceeds the current
138 <TT>MAX_SIZE_LOAD_ELEMENT_VALUE</TT>.
141 Many users expect from <TT>vtkGdcmReader</TT> it 'orders' the images
142 (that's the job of <TT>gdcm::SerieHelper</TT> ...)<br>
143 When user <b>knows</b> the files with same Serie UID
144 have same sizes, same 'pixel' type, same color convention, ...
145 the right way to proceed is as follow :
147 gdcm::SerieHelper *sh= new gdcm::SerieHelper();
148 // if user wants *not* to load some parts of the file headers
149 sh->SetLoadMode(loadMode);
151 // if user wants *not* to load some files
152 sh->AddRestriction(group, element, value, operator);
153 sh->AddRestriction( ...
154 sh->SetDirectory(directoryWithImages);
156 // if user *knows* how to order his files
157 sh->SetUserLessThanFunction(userSuppliedComparisonFunction);
159 // if user wants to sort reverse order
160 sh->SetSortOrderToReverse();
162 // here, we suppose only the first Coherent File List is of interest
163 // Just iterate using sh->NexttCoherentFileList()
164 // if you want to get all of them
165 gdcm::FileList *l = sh->GetFirstCoherentFileList();
167 // if user is doesn't trust too much the files with same Serie UID
168 if ( !sh->IsCoherent(l) )
169 return; // not same sizes, or not same 'pixel type' -> stop
171 sh->OrderFileList(l); // sort the list
173 vtkGdcmReader *reader = vtkGdcmReader::New();
174 // if user wants to modify pixel order (Mirror, TopDown, ...)
175 // he has to supply the function that does the job
176 // (a *very* simple example is given in vtkgdcmSerieViewer.cxx)
177 reader->SetUserFunction (userSuppliedFunction);
179 // to pass a 'Coherent File List' as produced by gdcm::SerieHelper
180 reader->SetCoherentFileList(l);
183 You can see a full example in <TT>vtk/vtkgdcmSerieViewer.cxx</TT><br>
186 <TT>vtkgdcmSerieViewer dirname=Dentist mirror</TT><br>
187 <TT>vtkgdcmSerieViewer dirname=Dentist reverse</TT><br>
188 <TT>vtkgdcmSerieViewer dirname=Dentist reverse topdown</TT><br>
192 <LI> <TT>vtkGdcmReader::SetUserFunction (userSuppliedFunction)</TT><br>
194 <TT>void userSuppliedFunction(uint8_t *imageData, File *f);</TT><br>
195 allows user to reorganize the pixels of each image just after reading
196 it (to mirror, or topdown the image, for instance)<br>
197 Note : <TT>uint8_t *</TT> doesn't mean it works only on 8 Bits images.
198 <br> It's for prototyping. Feel free to cast it.
201 SerieHelper::SetUserLessThanFunction(userSuppliedComparisonFunction)
202 </TT><br> with : <br>
203 <TT>bool userSuppliedComparisonFunction(File *, File *);</TT><br>
204 allows user -when he knows more about his files than gdcm does-
205 to give his own comparison function.
206 <LI> <TT>SerieHelper::SetSortOrderToReverse</TT> allows user to ask
207 to sort the Files reverse order.
208 <LI> <TT>SerieHelper::AddRestriction</TT> has now a new constructor<br>
209 <TT>AddRestriction(group, element, value, operator);</TT><br>
210 allows user to exclude some files from the sorting, according to
211 any comparison operator <br>
212 (<TT>GDCM_EQUAL</TT>, <TT>GDCM_DIFFERENT</TT>,
213 <TT>GDCM_GREATER</TT>, <TT>GDCM_GREATEROREQUAL</TT>,
214 <TT>GDCM_LESS</TT>, <TT>GDCM_LESSOREQUAL</TT>), not only on the
217 <LI> <TT>AnonymizeNoLoad</TT> used with <TT>dirin=inputDirectoryName</TT>
218 anonymizes all the files within the given Directory.
220 User may also choose extra elements he wants to rub out: <br>
221 <TT>rubout=listOfElementsToRubOut</TT><br>
222 with <tt>listOfElementsToRubOut : group1-elem1,group2-elem2,
223 ...</TT> (in hexa, no space within the list )
225 <LI> <TT>gdcm::SerieHelper()</TT> has a new method
226 <TT>void AddGdcmFile(File *header)</TT>, that allows aware user to
227 create a '<TT>FileList</TT>' (actually a
228 <TT>std::vector< File* > </TT>).<br>
229 The <TT>FileList</TT> created this way will be the
230 'first one' in the <TT>gdcm::FileHelper()</TT> (retrieve it with
231 <TT>FileList *GetFirstCoherentFileList()</TT> ).<br>
232 It may be sorted using <TT>OrderFileList</TT>.<br>
233 No 'coherence check' will be performed on this <TT>FileList</TT>
235 It may be passed to a <TT>vtkGdcmReader</TT>
236 (to avoid parsing twice the files)
238 <LI> <TT>vtkGdcmReader</TT> can now get the result of
239 <TT>gdcm::SerieHelper</TT> (to avoid parsing twice the files)<br>
240 Proceed as follow :<br>
242 gdcmSerieHelper *sh = new gdcmSerieHelper();
243 sh->SetDirectory(myImageDirectory, true);
244 gdcmFileList *l = s->GetFirstCoherentFileList();
247 vtkGdcmReader *gr = new vtkGdcmReader();
248 gr->SetCoherentFileList(l);
251 This works with a directory that contains only one '<TT>Serie</TT>'
252 (same <TT>Serie UID</TT> for all the images).<br>
253 If it contains more than one <TT>Serie</TT>, you'll have to loop
254 on the Series, using <TT>GetNextCoherentFileList()</TT>;<br>
255 It will be up to the user to delete the <TT>gdcm::File</TT>.
257 See <TT>vtkgdcmSerieViewer</TT> for an example.
259 <LI>Both <TT>vtkgdcmViewer</TT> and <TT>vtkgdcmViewer2</TT>
260 are available to allow easy displaying of single/multiframe
261 GreyLevel/RGB/PaletteColor images<br><br>
262 <LI> <TT>DICOMDIR</TT> anonymiser (<TT>Load</TT> and <TT>Noload</TT> mode)
264 <LI> Because the <TT>gdcm::DicomDir::Load()</TT> method may be used
265 either for loading an already made <TT>DICOMDIR</TT> file or for
266 parsing all the dicom files with a given root directory we
267 syntaxically separated the operations: <br>
268 For loading an already made <TT>DICOMDIR</TT> file, use : <br>
270 gdcm::DicomDir *d = new gdcm::DicomDir();
271 d->SetFileName(fileName);
275 For parsing all the dicom files within a given root directory, use :<br>
277 gdcm::DicomDir *d = new gdcm::DicomDir();
278 d->SetDirectoryName(dirName);
282 <b>Don't</b> use any longer old deprecated style: <br>
284 gdcm::DicomDir *d = new gdcm::DicomDir();<br>
285 d->SetParseDir(true); // </TT>or <TT>d->SetParseDir(false);<br>
286 d->Load( fileName );<br>
289 <LI> User is now allowed to tell <TT>gdcm::Document</TT> constructor
290 he doesn't want to deal with <TT>SeqEntry</TT>
291 (every time it's possible, i.e for 'true length' Sequences) <br>
292 and/or he doesn't want to deal with <TT>Shadow groups</TT>
293 (every time it's possible i.e. when element <TT>0x0000</TT>
294 exists for this Group) <br>
295 or he doesn't want to deal with <TT>SeqEntry</TT> that belong to a
296 <TT>Shadow group</TT> (every time it's possible
297 -'true length' Sequence-)<br>
300 gdcm::File *f = new gdcm::File();
301 f->SetLoadMode(NO_SEQ); | depending on what
302 f->SetLoadMode(NO_SHADOW); | you want *not*
303 f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the
304 f->SetLoadMode(NO_SHADOWSEQ); | target file
305 f->SetFileName(fileName);
308 <b>Don't</b> use any longer old deprecated style: <br>
310 gdcm::File *f = new gdcm::File(fileName);</TT> <br>
312 <LI> User is now allowed to tell <TT>gdcm::DicomDir</TT> constructor
313 he doesn't want to deal with <TT>SeqEntry</TT>
314 (every time it's possible, i.e for 'true length' Sequences) <br>
315 and/or he doesn't want to deal with <TT>Shadow groups</TT>
316 (every time it's possible i.e. when element <TT>0x0000</TT>
317 exists for this Group) <br>
318 or he doesn't want to deal with <TT>SeqEntry</TT> that belong to a
319 <TT>Shadow group</TT> (every time it's possible
320 -'true length' Sequence-)<br>
321 when he parses all the Dicom files within a given directory.<br>
324 gdcm::DicomDir *f = new gdcm::DicomDir();
325 f->SetLoadMode(NO_SEQ); | depending on what
326 f->SetLoadMode(NO_SHADOW); | you want *not*
327 f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the files
328 f->SetLoadMode(NO_SHADOWSEQ); | within the root directory
329 f->SetDirectoryName(rootDirectoryName);
332 <b>Don't</b> use any longer old deprecated style: <br>
334 gdcm::DicomDir *dcmdir = new gdcm::DicomDir(dirName, true);</TT><br>
340 <LI> No more trouble when the 'endianess' switches within Sequences.
341 <LI> No more trouble with 'no length Sequences' belonging to a
342 <TT>Shadow Group</TT> when they are 'Implicit VR'.
343 <LI> The difference between <TT>MONOCHROME1</TT> (low values = bright,
344 high values = dark) and <TT>MONOCHROME2</TT> (low values = dark,
345 high values = bright) is now taken into account.<br>
346 It's no longer up to the user to change the pixels value
347 <LI> Writing a 'True Dicom' image after reading an <TT>ACR-NEMA</TT> image
348 does not request any longer from the user to build up
349 'manually' the Meta Elements group (<TT>0x0002</TT>)
350 <LI> Old '24 Bits' <TT>ACR-NEMA</TT> are now correctly re-written
351 in <TT>DICOM V3</TT> mode.
352 <LI> Element <TT>0x0000</TT> of <TT>Shadow groups</TT> is always forced to be a
353 <TT>ValEntry</TT> and its <TT>VR</TT> is forced to <TT>UL</TT>
357 <LI> A.P.I. breaking modifications (since previous version : <TT>1.0</TT>)
359 <LI> NEVER more API breaking modifications !!!
365 <LI> Use of <TT>Implicit Value Representation</TT> writting mode may
366 causes troubles, when there are some <TT>SQ</TT> belonging to a
367 <TT>Shadow Group</TT>. <br>
368 Better you use <TT>Explicit Value Representation</TT> writting mode ...
369 <LI> Troubles on 'Big endian' processors (i.e. Apple/Motorola, SunSparc
370 ...) when writting 16 Bits images.
371 <LI> Troubles on 64-bits processors.
378 <!#######################################################################>
379 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
381 <A CLASS="anchor" NAME="NewsVersion1_0">
382 <B>Version 1.0 (Feb 14 2005)</B></A>
388 <a href="Doc1.0/uml-gdcmV1.0.pdf">gdcm 1.0 UML Class Diagram</a> version.
389 <LI> <a href= "Doc1.0/html.user/index.html">User Documentation"</a>
390 <LI> <a href= "Doc1.0/html.developper/index.html">Developper
392 <LI> Final check of the jpeg sub-library: all 'classical' jpeg
393 compressed Dicom files can be read<br>
394 <LI>All the previously gdcm-breaker images are now readable<br>
395 <LI> A huge number of memory leaks removed
396 <LI> Improvement of write process
400 <LI> A.P.I. breaking modifications (since previous version : <TT>0.6</TT>)
402 <LI> Use of <TT> namespace</TT> : all the methods formerly named
403 <TT>className::gdcmXxx()</TT> are now named <TT>className::Xxx()</TT>
404 <br> End user will have to call them as <TT>gdcm::className::Xxx() </TT>
405 <LI> a <TT>gdcm::Document</TT> is now specialized in :
407 <LI> <TT>gdcm::DicomDir</TT>
408 <LI> <TT>gdcm::File</TT>
410 <LI> a <TT>gdcm::DicomElementSet</TT> is composed of a set of
411 <TT>gdcm::DicomDocEntry</TT>
412 <LI> a <TT>gdcm::DicomDocEntry</TT> can be :
414 <LI> a <TT>gdcm::ContentEntry</TT>, specialized in :
416 <LI> <TT>gdcm::ValEntry</TT>
417 <LI> <TT>gdcm::BinEntry</TT> (no longer a specialization of
418 <TT>gdcm::ValEntry</TT>)
420 <LI> a <TT>gdcm::SeqEntry</TT>
422 <LI> Removal of useless accessors <TT>GetXxxByname</TT>, <TT>SetXxxByname</TT>
423 <LI> Renaming of accessors <TT>GetXxxByNumber</TT>, <TT>SetXxxByNumber</TT>
426 <LI> <TT>GetEntryByNumber
427
428 --> GetEntryValue</TT>
429 <LI> <TT>GetEntryLengthByNumber --> GetEntryLength</TT>
430 <LI> <TT>GetEntryOffsetByNumber --> GetEntryOffset</TT>
431 <LI> <TT>GetEntryVRByNumber
432 --> GetEntryVR</TT>
434 <LI> <TT>GetDocEntryByNumber
435 --> GetDocEntry</TT>
436 <LI> <TT>GetValEntryByNumber
437 --> GetValEntry</TT>
438 <LI> <TT>GetBinEntryByNumber
439 --> GetBinEntry</TT>
440 <LI> <TT>GetSeqEntryByNumber
441 --> GetSeqEntry</TT>
446 <!#######################################################################>
447 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
449 <A CLASS="anchor" NAME="NewsVersion0_6">
450 <B>Version 0.6 (June 8 2004)</B></A>
453 This version will be used by Insight Tool Kit
454 (<a href="http://www.itk.org">ITK</a> 2.0) at the beginning of 2005.<br>
455 It's not yet packaged ...<br><br>
456 <LI> <a href= "Doc0.6/html.user/index.html">User Documentation"</a>
457 <LI> <a href= "Doc0.6/html.developper/index.html">Developper Documentation"</a>
458 <LI> The new <TT>gdcmDocument</TT> class is a parent class of
459 <TT>gdcmHeader</TT> class and <TT>gdcmDicomDir</TT> class.
460 <LI> Massive modifications in the Class Diagram :
462 <LI> any dicom related file is a <TT>gdcmDocument</TT>
463 <LI> a <TT>gdcmDocument</TT> can be :
465 <LI> a <TT>gdcmHeader</TT>, if it contains pixel data
466 <LI> a <TT>gdcmDicomDir</TT>, if it contains only informations
467 on the files in a given directory
470 <LI> a <TT>gdcmDocument</TT> is_a <TT>gdcmElementSet</TT>,
471 composed of a set of <TT>gdcmEntry</TT> separated into :
473 <LI> <TT>gdcmValEntry</TT><br>
474 a specialization of <TT>gdcmValEntry</TT>, for 'non
475 <TT>std::string</TT> representable' values is
476 <TT>gdcmBinEntry</TT>
477 <LI> <TT>gdcmSeqEntry</TT> (VR = <TT>SQ</TT>, i.e Dicom Sequences)<br>
478 they are dealt as tree-like structures :<br>
479 - a <TT>gdcmSeqEntry</TT> is considered as a set
480 of <TT>gdcmSQItem</TT>,<br>
481 - a <TT>gdcmSQItem</TT> is_a <TT>gdcmElementSet</TT>, composed
482 of <TT>gdcmDocEntries</TT>, recursively <br>
485 <LI> Improvement of the jpeg sub-library: jpeg
486 compressed Dicom files (lossless and lossy)
487 might be read (check-it out)
490 <!#######################################################################>
491 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
493 <A CLASS="anchor" NAME="NewsVersion0_4">
494 <B>Version 0.4 (February 6 2004)</B></A>
498 <LI> <a href="Doc0.4/uml-gdcmV0.4.pdf">gdcm 0.4 UML Class Diagram</a>.
499 <LI> <a href= "Doc0.4/html.user/index.html">User Documentation"</a>
500 <LI> <a href= "Doc0.4/html.developper/index.html">Developper Documentation </a>
502 <LI> Introduction of a jpeg sub-library: some very simple jpeg-lossy
503 compressed Dicom files might be working (check-it out).
504 <LI> And also, fewer memory leaks, cleaned-up stl usage (should work
505 with gcc-3.x), python disutil installer (see file setup.py)
506 supporting both Swig and vtk wrapping.
507 <LI> Introduction of a RLE (Run-Time Encoding) library
508 <LI> Color images (RGB or Palette Color) are dealt with
509 <LI> Confusing names <TT>gdcmPatient</TT>, <TT>gdcmStudy</TT>,
510 <TT>gdcmSerie</TT>, <TT>gdcmPatient</TT> changed to
511 <TT>gdcmDicomDirPatient</TT>, <TT>gdcmDicomDirStudy</TT>,
512 <TT>gdcmDicomDirSerie</TT>, <TT>gdcmDicomDirPatient</TT>
516 <!#######################################################################>
517 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
519 <A CLASS="anchor" NAME="NewsVersion0_3">
520 <B>Version 0.3 (July 8 2003)</B></A>
523 <LI> <TT>gdcmFile</TT> class now enables acces to the data
524 i.e. the image[s] content. Previously only parsing of the
525 Dicom header was available through usage of <TT>gdcmHeader</TT>
527 <LI> a <A HREF="http://public.kitware.com/VTK/">VTK</A> plugin
528 of gdcm is now available through the <TT>vtkGdcmReader</TT>
529 vtk class (see it as a vtk wrapper of gdcm), which enables
531 <LI> Loading of a single image,
532 <LI> Loading of a stack of images from multiple Dicom files,
533 <LI> this class is wrapped for vtkPython (by using native vtk
536 <LI> Introduction of a jpeg sub-library: lossless-jpeg
537 compressed Dicom files work.
538 <LI> <TT>vtkgdcmViewer</TT> allows easy displaying of single/multiframe
539 GreyLevel/RGB/PaletteColor images
542 <!#######################################################################>
543 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
545 <A CLASS="anchor" NAME="NewsVersion0_1">
546 <B>Version 0.1 (April 1 2003)</B></A>
548 <!#######################################################################>
549 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
551 <A CLASS="anchor" name="NewsVersion0_1">
552 <B>Version 0.0 (March 14 2003)</B></A>
554 <HR size="1"><ADDRESS style="align: right;"></ADRESS>