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 void Document::AddForceLoadElement(uint16_t group, uint16_t elem);
128 allows user to tell <TT>gdcm::Document</TT> Loader he wants
129 to force the loading of a given set of <TT>DocEntries</TT>,
130 even if their length exceeds the current
131 <TT>MAX_SIZE_LOAD_ELEMENT_VALUE</TT>.
134 Many users expect from <TT>vtkGdcmReader</TT> it 'orders' the images
135 (that's the job of <TT>gdcm::SerieHelper</TT> ...)<br>
136 When user <b>knows</b> the files with same Serie UID
137 have same sizes, same 'pixel' type, same color convention, ...
138 the right way to proceed is as follow :
140 gdcm::SerieHelper *sh= new gdcm::SerieHelper();
141 // if user wants *not* to load some parts of the file headers
142 sh->SetLoadMode(loadMode);
144 // if user wants *not* to load some files
145 sh->AddRestriction(group, element, value, operator);
146 sh->AddRestriction( ...
147 sh->SetDirectory(directoryWithImages);
149 // if user wants to sort reverse order
150 sh->SetSortOrderToReverse();
152 // if user *knows* how to order his files
153 sh->SetUserLessThanFunction(userSuppliedComparisonFunction);
155 // here, we suppose only the first Coherent File List is of interest
156 gdcm::FileList *l = sh->GetFirstCoherentFileList();
158 // if user is doesn't trust too much the files with same Serie UID
159 if ( !sh->IsCoherent(l) )
160 return; // not same sizes, or not same 'pixel type' -> stop
162 sh->OrderFileList(l); // sort the list
164 vtkGdcmReader *reader = vtkGdcmReader::New();
165 // if user wants to modify pixel order (Mirror, TopDown, ...)
166 // he has to supply the function that does the job
167 // (a *very* simple example is given in vtkgdcmSerieViewer.cxx)
168 reader->SetUserFunction (userSuppliedFunction);
170 // to pass a 'Coherent File List' as produced by gdcm::SerieHelper
171 reader->SetCoherentFileList(l);
174 You can see a full example in <TT>vtk/vtkgdcmSerieViewer.cxx</TT><br>
177 <TT>vtkgdcmSerieViewer dirname=Dentist mirror</TT><br>
178 <TT>vtkgdcmSerieViewer dirname=Dentist reverse</TT><br>
179 <TT>vtkgdcmSerieViewer dirname=Dentist reverse topdown</TT><br>
183 <LI> <TT>vtkGdcmReader::SetUserFunction (userSuppliedFunction)</TT><br>
185 <TT>void userSuppliedFunction(uint8_t *imageData, File *f);</TT><br>
186 allows user to reorganize the pixels of each image just after reading
187 it (to mirror, or topdown the image, for instance)<br>
188 Note : <TT>uint8_t *</TT> doesn't mean it works only on 8 Bits images.
189 <br> It's for prototyping. Feel free to cast it.
192 SerieHelper::SetUserLessThanFunction(userSuppliedComparisonFunction)
193 </TT><br> with : <br>
194 <TT>bool userSuppliedComparisonFunction(File *, File *);</TT><br>
195 allows user -when he knows more about his files than gdcm does-
196 to give his own comparison function.
197 <LI> <TT>SerieHelper::SetSortOrderToReverse</TT> allows user to ask
198 to sort the Files reverse order.
199 <LI> <TT>SerieHelper::AddRestriction</TT> has now a new constructor<br>
200 <TT>AddRestriction(group, element, value, operator);</TT><br>
201 allows user to exclude some files from the sorting, according to
202 any comparison operator <br>
203 (<TT>GDCM_EQUAL</TT>, <TT>GDCM_DIFFERENT</TT>,
204 <TT>GDCM_GREATER</TT>, <TT>GDCM_GREATEROREQUAL</TT>,
205 <TT>GDCM_LESS</TT>, <TT>GDCM_LESSOREQUAL</TT>), not only on the
208 <LI> <TT>AnonymizeNoLoad</TT> used with <TT>dirin=inputDirectoryName</TT>
209 anonymizes all the files within the given Directory.
211 User may also choose extra elements he wants to rub out: <br>
212 <TT>rubout=listOfElementsToRubOut</TT><br>
213 with <tt>listOfElementsToRubOut : group1-elem1,group2-elem2,
214 ...</TT> (in hexa, no space within the list )
216 <LI> <TT>gdcm::SerieHelper()</TT> has a new method
217 <TT>void AddGdcmFile(File *header)</TT>, that allows aware user to
218 create a '<TT>FileList</TT>' (actually a
219 <TT>std::vector< File* > </TT>).<br>
220 The <TT>FileList</TT> created this way will be the
221 'first one' in the <TT>gdcm::FileHelper()</TT> (retrieve it with
222 <TT>FileList *GetFirstCoherentFileList()</TT> ).<br>
223 It may be sorted using <TT>OrderFileList</TT>.<br>
224 No 'coherence check' will be performed on this <TT>FileList</TT>
226 It may be passed to a <TT>vtkGdcmReader</TT>
227 (to avoid parsing twice the files)
229 <LI> <TT>vtkGdcmReader</TT> can now get the result of
230 <TT>gdcm::SerieHelper</TT> (to avoid parsing twice the files)<br>
231 Proceed as follow :<br>
233 gdcmSerieHelper *sh = new gdcmSerieHelper();
234 sh->SetDirectory(myImageDirectory, true);
235 gdcmFileList *l = s->GetFirstCoherentFileList();
238 vtkGdcmReader *gr = new vtkGdcmReader();
239 gr->SetCoherentFileList(l);
242 This works with a directory that contains only one '<TT>Serie</TT>'
243 (same <TT>Serie UID</TT> for all the images).<br>
244 If it contains more than one <TT>Serie</TT>, you'll have to loop
245 on the Series, using <TT>GetNextCoherentFileList()</TT>;<br>
246 It will be up to the user to delete the <TT>gdcm::File</TT>.
248 See <TT>vtkgdcmSerieViewer</TT> for an example.
250 <LI>Both <TT>vtkgdcmViewer</TT> and <TT>vtkgdcmViewer2</TT>
251 are available to allow easy displaying of single/multiframe
252 GreyLevel/RGB/PaletteColor images<br><br>
253 <LI> <TT>DICOMDIR</TT> anonymiser (<TT>Load</TT> and <TT>Noload</TT> mode)
255 <LI> Because the <TT>gdcm::DicomDir::Load()</TT> method may be used
256 either for loading an already made <TT>DICOMDIR</TT> file or for
257 parsing all the dicom files with a given root directory we
258 syntaxically separated the operations: <br>
259 For loading an already made <TT>DICOMDIR</TT> file, use : <br>
261 gdcm::DicomDir *d = new gdcm::DicomDir();
262 d->SetFileName(fileName);
266 For parsing all the dicom files within a given root directory, use :<br>
268 gdcm::DicomDir *d = new gdcm::DicomDir();
269 d->SetDirectoryName(dirName);
273 <b>Don't</b> use any longer old deprecated style: <br>
275 gdcm::DicomDir *d = new gdcm::DicomDir();<br>
276 d->SetParseDir(true); // </TT>or <TT>d->SetParseDir(false);<br>
277 d->Load( fileName );<br>
280 <LI> User is now allowed to tell <TT>gdcm::Document</TT> constructor
281 he doesn't want to deal with <TT>SeqEntry</TT>
282 (every time it's possible, i.e for 'true length' Sequences) <br>
283 and/or he doesn't want to deal with <TT>Shadow groups</TT>
284 (every time it's possible i.e. when element <TT>0x0000</TT>
285 exists for this Group) <br>
286 or he doesn't want to deal with <TT>SeqEntry</TT> that belong to a
287 <TT>Shadow group</TT> (every time it's possible
288 -'true length' Sequence-)<br>
291 gdcm::File *f = new gdcm::File();
292 f->SetLoadMode(NO_SEQ); | depending on what
293 f->SetLoadMode(NO_SHADOW); | you want *not*
294 f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the
295 f->SetLoadMode(NO_SHADOWSEQ); | target file
296 f->SetFileName(fileName);
299 <b>Don't</b> use any longer old deprecated style: <br>
301 gdcm::File *f = new gdcm::File(fileName);</TT> <br>
303 <LI> User is now allowed to tell <TT>gdcm::DicomDir</TT> constructor
304 he doesn't want to deal with <TT>SeqEntry</TT>
305 (every time it's possible, i.e for 'true length' Sequences) <br>
306 and/or he doesn't want to deal with <TT>Shadow groups</TT>
307 (every time it's possible i.e. when element <TT>0x0000</TT>
308 exists for this Group) <br>
309 or he doesn't want to deal with <TT>SeqEntry</TT> that belong to a
310 <TT>Shadow group</TT> (every time it's possible
311 -'true length' Sequence-)<br>
312 when he parses all the Dicom files within a given directory.<br>
315 gdcm::DicomDir *f = new gdcm::DicomDir();
316 f->SetLoadMode(NO_SEQ); | depending on what
317 f->SetLoadMode(NO_SHADOW); | you want *not*
318 f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the files
319 f->SetLoadMode(NO_SHADOWSEQ); | within the root directory
320 f->SetDirectoryName(rootDirectoryName);
323 <b>Don't</b> use any longer old deprecated style: <br>
325 gdcm::DicomDir *dcmdir = new gdcm::DicomDir(dirName, true);</TT><br>
331 <LI> No more trouble when the 'endianess' switches within Sequences.
332 <LI> No more trouble with 'no length Sequences' belonging to a
333 <TT>Shadow Group</TT> when they are 'Implicit VR'.
334 <LI> The difference between <TT>MONOCHROME1</TT> (low values = bright,
335 high values = dark) and <TT>MONOCHROME2</TT> (low values = dark,
336 high values = bright) is now taken into account.<br>
337 It's no longer up to the user to change the pixels value
338 <LI> Writing a 'True Dicom' image after reading an <TT>ACR-NEMA</TT> image
339 does not request any longer from the user to build up
340 'manually' the Meta Elements group (<TT>0x0002</TT>)
341 <LI> Old '24 Bits' <TT>ACR-NEMA</TT> are now correctly re-written
342 in <TT>DICOM V3</TT> mode.
343 <LI> Element <TT>0x0000</TT> of <TT>Shadow groups</TT> is always forced to be a
344 <TT>ValEntry</TT> and its <TT>VR</TT> is forced to <TT>UL</TT>
348 <LI> A.P.I. breaking modifications (since previous version : <TT>1.0</TT>)
350 <LI> NEVER more API breaking modifications !!!
356 <LI> Use of <TT>Implicit Value Representation</TT> writting mode may
357 causes troubles, when there are some <TT>SQ</TT> belonging to a
358 <TT>Shadow Group</TT>. <br>
359 Better you use <TT>Explicit Value Representation</TT> writting mode ...
360 <LI> Troubles on 'Big endian' processors (i.e. Apple/Motorola, SunSparc
361 ...) when writting 16 Bits images.
362 <LI> Troubles on 64-bits processors.
369 <!#######################################################################>
370 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
372 <A CLASS="anchor" NAME="NewsVersion1_0">
373 <B>Version 1.0 (Feb 14 2005)</B></A>
379 <a href="Doc1.0/uml-gdcmV1.0.pdf">gdcm 1.0 UML Class Diagram</a> version.
380 <LI> <a href= "Doc1.0/html.user/index.html">User Documentation"</a>
381 <LI> <a href= "Doc1.0/html.developper/index.html">Developper
383 <LI> Final check of the jpeg sub-library: all 'classical' jpeg
384 compressed Dicom files can be read<br>
385 <LI>All the previously gdcm-breaker images are now readable<br>
386 <LI> A huge number of memory leaks removed
387 <LI> Improvement of write process
391 <LI> A.P.I. breaking modifications (since previous version : <TT>0.6</TT>)
393 <LI> Use of <TT> namespace</TT> : all the methods formerly named
394 <TT>className::gdcmXxx()</TT> are now named <TT>className::Xxx()</TT>
395 <br> End user will have to call them as <TT>gdcm::className::Xxx() </TT>
396 <LI> a <TT>gdcm::Document</TT> is now specialized in :
398 <LI> <TT>gdcm::DicomDir</TT>
399 <LI> <TT>gdcm::File</TT>
401 <LI> a <TT>gdcm::DicomElementSet</TT> is composed of a set of
402 <TT>gdcm::DicomDocEntry</TT>
403 <LI> a <TT>gdcm::DicomDocEntry</TT> can be :
405 <LI> a <TT>gdcm::ContentEntry</TT>, specialized in :
407 <LI> <TT>gdcm::ValEntry</TT>
408 <LI> <TT>gdcm::BinEntry</TT> (no longer a specialization of
409 <TT>gdcm::ValEntry</TT>)
411 <LI> a <TT>gdcm::SeqEntry</TT>
413 <LI> Removal of useless accessors <TT>GetXxxByname</TT>, <TT>SetXxxByname</TT>
414 <LI> Renaming of accessors <TT>GetXxxByNumber</TT>, <TT>SetXxxByNumber</TT>
417 <LI> <TT>GetEntryByNumber
418
419 --> GetEntryValue</TT>
420 <LI> <TT>GetEntryLengthByNumber --> GetEntryLength</TT>
421 <LI> <TT>GetEntryOffsetByNumber --> GetEntryOffset</TT>
422 <LI> <TT>GetEntryVRByNumber
423 --> GetEntryVR</TT>
425 <LI> <TT>GetDocEntryByNumber
426 --> GetDocEntry</TT>
427 <LI> <TT>GetValEntryByNumber
428 --> GetValEntry</TT>
429 <LI> <TT>GetBinEntryByNumber
430 --> GetBinEntry</TT>
431 <LI> <TT>GetSeqEntryByNumber
432 --> GetSeqEntry</TT>
437 <!#######################################################################>
438 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
440 <A CLASS="anchor" NAME="NewsVersion0_6">
441 <B>Version 0.6 (June 8 2004)</B></A>
444 This version will be used by Insight Tool Kit
445 (<a href="http://www.itk.org">ITK</a> 2.0) at the beginning of 2005.<br>
446 It's not yet packaged ...<br><br>
447 <LI> <a href= "Doc0.6/html.user/index.html">User Documentation"</a>
448 <LI> <a href= "Doc0.6/html.developper/index.html">Developper Documentation"</a>
449 <LI> The new <TT>gdcmDocument</TT> class is a parent class of
450 <TT>gdcmHeader</TT> class and <TT>gdcmDicomDir</TT> class.
451 <LI> Massive modifications in the Class Diagram :
453 <LI> any dicom related file is a <TT>gdcmDocument</TT>
454 <LI> a <TT>gdcmDocument</TT> can be :
456 <LI> a <TT>gdcmHeader</TT>, if it contains pixel data
457 <LI> a <TT>gdcmDicomDir</TT>, if it contains only informations
458 on the files in a given directory
461 <LI> a <TT>gdcmDocument</TT> is_a <TT>gdcmElementSet</TT>,
462 composed of a set of <TT>gdcmEntry</TT> separated into :
464 <LI> <TT>gdcmValEntry</TT><br>
465 a specialization of <TT>gdcmValEntry</TT>, for 'non
466 <TT>std::string</TT> representable' values is
467 <TT>gdcmBinEntry</TT>
468 <LI> <TT>gdcmSeqEntry</TT> (VR = <TT>SQ</TT>, i.e Dicom Sequences)<br>
469 they are dealt as tree-like structures :<br>
470 - a <TT>gdcmSeqEntry</TT> is considered as a set
471 of <TT>gdcmSQItem</TT>,<br>
472 - a <TT>gdcmSQItem</TT> is_a <TT>gdcmElementSet</TT>, composed
473 of <TT>gdcmDocEntries</TT>, recursively <br>
476 <LI> Improvement of the jpeg sub-library: jpeg
477 compressed Dicom files (lossless and lossy)
478 might be read (check-it out)
481 <!#######################################################################>
482 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
484 <A CLASS="anchor" NAME="NewsVersion0_4">
485 <B>Version 0.4 (February 6 2004)</B></A>
489 <LI> <a href="Doc0.4/uml-gdcmV0.4.pdf">gdcm 0.4 UML Class Diagram</a>.
490 <LI> <a href= "Doc0.4/html.user/index.html">User Documentation"</a>
491 <LI> <a href= "Doc0.4/html.developper/index.html">Developper Documentation </a>
493 <LI> Introduction of a jpeg sub-library: some very simple jpeg-lossy
494 compressed Dicom files might be working (check-it out).
495 <LI> And also, fewer memory leaks, cleaned-up stl usage (should work
496 with gcc-3.x), python disutil installer (see file setup.py)
497 supporting both Swig and vtk wrapping.
498 <LI> Introduction of a RLE (Run-Time Encoding) library
499 <LI> Color images (RGB or Palette Color) are dealt with
500 <LI> Confusing names <TT>gdcmPatient</TT>, <TT>gdcmStudy</TT>,
501 <TT>gdcmSerie</TT>, <TT>gdcmPatient</TT> changed to
502 <TT>gdcmDicomDirPatient</TT>, <TT>gdcmDicomDirStudy</TT>,
503 <TT>gdcmDicomDirSerie</TT>, <TT>gdcmDicomDirPatient</TT>
507 <!#######################################################################>
508 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
510 <A CLASS="anchor" NAME="NewsVersion0_3">
511 <B>Version 0.3 (July 8 2003)</B></A>
514 <LI> <TT>gdcmFile</TT> class now enables acces to the data
515 i.e. the image[s] content. Previously only parsing of the
516 Dicom header was available through usage of <TT>gdcmHeader</TT>
518 <LI> a <A HREF="http://public.kitware.com/VTK/">VTK</A> plugin
519 of gdcm is now available through the <TT>vtkGdcmReader</TT>
520 vtk class (see it as a vtk wrapper of gdcm), which enables
522 <LI> Loading of a single image,
523 <LI> Loading of a stack of images from multiple Dicom files,
524 <LI> this class is wrapped for vtkPython (by using native vtk
527 <LI> Introduction of a jpeg sub-library: lossless-jpeg
528 compressed Dicom files work.
529 <LI> <TT>vtkgdcmViewer</TT> allows easy displaying of single/multiframe
530 GreyLevel/RGB/PaletteColor images
533 <!#######################################################################>
534 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
536 <A CLASS="anchor" NAME="NewsVersion0_1">
537 <B>Version 0.1 (April 1 2003)</B></A>
539 <!#######################################################################>
540 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
542 <A CLASS="anchor" name="NewsVersion0_1">
543 <B>Version 0.0 (March 14 2003)</B></A>
545 <HR size="1"><ADDRESS style="align: right;"></ADRESS>