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 manual adjunction / automatic recognition (pfff!...)
104 of the private <TT>Dicom Dictionary</TT>
105 to be used to parse <TT>Shadow groups</TT> against.
108 <!#######################################################################>
109 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
111 <A CLASS="anchor" NAME="NewsCurrentVersion">
112 <B>Current Version</B></A>
120 <a href="uml-gdcm.pdf">gdcm UML Class Diagram</a> current version.
123 <LI> <A HREF="News.html#missing">Missing Features</a>
127 (Not a great one ...)
128 Stupid method names : <br><TT>DicomDir::WriteDicomDir()</TT>
129 and <TT>DicomDir::AnonymizeDicomDir()</TT> <br>replaced by : <br>
130 <TT>DicomDir::Write()</TT>
131 and <TT>DicomDir::Anonymize()</TT>
134 void Document::AddForceLoadElement(uint16_t group, uint16_t elem);
136 allows user to tell <TT>gdcm::Document</TT> Loader he wants
137 to force the loading of a given set of <TT>DocEntries</TT>,
138 even if their length exceeds the current
139 <TT>MAX_SIZE_LOAD_ELEMENT_VALUE</TT>.
142 Many users expect from <TT>vtkGdcmReader</TT> it 'orders' the images
143 (that's the job of <TT>gdcm::SerieHelper</TT> ...)<br>
144 When user <b>knows</b> the files with same Serie UID
145 have same sizes, same 'pixel' type, same color convention, ...
146 the right way to proceed is as follow :
148 gdcm::SerieHelper *sh= new gdcm::SerieHelper();
149 // if user wants *not* to load some parts of the file headers
150 sh->SetLoadMode(loadMode);
152 // if user wants *not* to load some files
153 sh->AddRestriction(group, element, value, operator);
154 sh->AddRestriction( ...
155 sh->SetDirectory(directoryWithImages);
157 // if user *knows* how to order his files
158 sh->SetUserLessThanFunction(userSuppliedComparisonFunction);
160 // if user wants to sort reverse order
161 sh->SetSortOrderToReverse();
163 // here, we suppose only the first Coherent File List is of interest
164 // Just iterate using sh->NexttCoherentFileList()
165 // if you want to get all of them
166 gdcm::FileList *l = sh->GetFirstCoherentFileList();
168 // if user is doesn't trust too much the files with same Serie UID
169 if ( !sh->IsCoherent(l) )
170 return; // not same sizes, or not same 'pixel type' -> stop
172 sh->OrderFileList(l); // sort the list
174 vtkGdcmReader *reader = vtkGdcmReader::New();
175 // if user wants to modify pixel order (Mirror, TopDown, ...)
176 // he has to supply the function that does the job
177 // (a *very* simple example is given in vtkgdcmSerieViewer.cxx)
178 reader->SetUserFunction (userSuppliedFunction);
180 // to pass a 'Coherent File List' as produced by gdcm::SerieHelper
181 reader->SetCoherentFileList(l);
184 You can see a full example in <TT>vtk/vtkgdcmSerieViewer.cxx</TT><br>
187 <TT>vtkgdcmSerieViewer dirname=Dentist mirror</TT><br>
188 <TT>vtkgdcmSerieViewer dirname=Dentist reverse</TT><br>
189 <TT>vtkgdcmSerieViewer dirname=Dentist reverse topdown</TT><br>
193 <LI> <TT>vtkGdcmReader::SetUserFunction (userSuppliedFunction)</TT><br>
195 <TT>void userSuppliedFunction(uint8_t *imageData, File *f);</TT><br>
196 allows user to reorganize the pixels of each image just after reading
197 it (to mirror, or topdown the image, for instance)<br>
198 Note : <TT>uint8_t *</TT> doesn't mean it works only on 8 Bits images.
199 <br> It's for prototyping. Feel free to cast it.
202 SerieHelper::SetUserLessThanFunction(userSuppliedComparisonFunction)
203 </TT><br> with : <br>
204 <TT>bool userSuppliedComparisonFunction(File *, File *);</TT><br>
205 allows user -when he knows more about his files than gdcm does-
206 to give his own comparison function.
207 <LI> <TT>SerieHelper::SetSortOrderToReverse</TT> allows user to ask
208 to sort the Files reverse order.
209 <LI> <TT>SerieHelper::AddRestriction</TT> has now a new constructor<br>
210 <TT>AddRestriction(group, element, value, operator);</TT><br>
211 allows user to exclude some files from the sorting, according to
212 any comparison operator <br>
213 (<TT>GDCM_EQUAL</TT>, <TT>GDCM_DIFFERENT</TT>,
214 <TT>GDCM_GREATER</TT>, <TT>GDCM_GREATEROREQUAL</TT>,
215 <TT>GDCM_LESS</TT>, <TT>GDCM_LESSOREQUAL</TT>), not only on the
218 <LI> <TT>AnonymizeNoLoad</TT> used with <TT>dirin=inputDirectoryName</TT>
219 anonymizes all the files within the given Directory.
221 User may also choose extra elements he wants to rub out: <br>
222 <TT>rubout=listOfElementsToRubOut</TT><br>
223 with <tt>listOfElementsToRubOut : group1-elem1,group2-elem2,
224 ...</TT> (in hexa, no space within the list )
226 <LI> <TT>gdcm::SerieHelper()</TT> has a new method
227 <TT>void AddGdcmFile(File *header)</TT>, that allows aware user to
228 create a '<TT>FileList</TT>' (actually a
229 <TT>std::vector< File* > </TT>).<br>
230 The <TT>FileList</TT> created this way will be the
231 'first one' in the <TT>gdcm::FileHelper()</TT> (retrieve it with
232 <TT>FileList *GetFirstCoherentFileList()</TT> ).<br>
233 It may be sorted using <TT>OrderFileList</TT>.<br>
234 No 'coherence check' will be performed on this <TT>FileList</TT>
236 It may be passed to a <TT>vtkGdcmReader</TT>
237 (to avoid parsing twice the files)
239 <LI> <TT>vtkGdcmReader</TT> can now get the result of
240 <TT>gdcm::SerieHelper</TT> (to avoid parsing twice the files)<br>
241 Proceed as follow :<br>
243 gdcmSerieHelper *sh = new gdcmSerieHelper();
244 sh->SetDirectory(myImageDirectory, true);
245 gdcmFileList *l = s->GetFirstCoherentFileList();
248 vtkGdcmReader *gr = new vtkGdcmReader();
249 gr->SetCoherentFileList(l);
252 This works with a directory that contains only one '<TT>Serie</TT>'
253 (same <TT>Serie UID</TT> for all the images).<br>
254 If it contains more than one <TT>Serie</TT>, you'll have to loop
255 on the Series, using <TT>GetNextCoherentFileList()</TT>;<br>
256 It will be up to the user to delete the <TT>gdcm::File</TT>.
258 See <TT>vtkgdcmSerieViewer</TT> for an example.
260 <LI>Both <TT>vtkgdcmViewer</TT> and <TT>vtkgdcmViewer2</TT>
261 are available to allow easy displaying of single/multiframe
262 GreyLevel/RGB/PaletteColor images<br><br>
263 <LI> <TT>DICOMDIR</TT> anonymiser (<TT>Load</TT> and <TT>Noload</TT> mode)
265 <LI> Because the <TT>gdcm::DicomDir::Load()</TT> method may be used
266 either for loading an already made <TT>DICOMDIR</TT> file or for
267 parsing all the dicom files with a given root directory we
268 syntaxically separated the operations: <br>
269 For loading an already made <TT>DICOMDIR</TT> file, use : <br>
271 gdcm::DicomDir *d = new gdcm::DicomDir();
272 d->SetFileName(fileName);
276 For parsing all the dicom files within a given root directory, use :<br>
278 gdcm::DicomDir *d = new gdcm::DicomDir();
279 d->SetDirectoryName(dirName);
283 <b>Don't</b> use any longer old deprecated style: <br>
285 gdcm::DicomDir *d = new gdcm::DicomDir();<br>
286 d->SetParseDir(true); // </TT>or <TT>d->SetParseDir(false);<br>
287 d->Load( fileName );<br>
290 <LI> User is now allowed to tell <TT>gdcm::Document</TT> constructor
291 he doesn't want to deal with <TT>SeqEntry</TT>
292 (every time it's possible, i.e for 'true length' Sequences) <br>
293 and/or he doesn't want to deal with <TT>Shadow groups</TT>
294 (every time it's possible i.e. when element <TT>0x0000</TT>
295 exists for this Group) <br>
296 or he doesn't want to deal with <TT>SeqEntry</TT> that belong to a
297 <TT>Shadow group</TT> (every time it's possible
298 -'true length' Sequence-)<br>
301 gdcm::File *f = new gdcm::File();
302 f->SetLoadMode(NO_SEQ); | depending on what
303 f->SetLoadMode(NO_SHADOW); | you want *not*
304 f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the
305 f->SetLoadMode(NO_SHADOWSEQ); | target file
306 f->SetFileName(fileName);
309 <b>Don't</b> use any longer old deprecated style: <br>
311 gdcm::File *f = new gdcm::File(fileName);</TT> <br>
313 <LI> User is now allowed to tell <TT>gdcm::DicomDir</TT> constructor
314 he doesn't want to deal with <TT>SeqEntry</TT>
315 (every time it's possible, i.e for 'true length' Sequences) <br>
316 and/or he doesn't want to deal with <TT>Shadow groups</TT>
317 (every time it's possible i.e. when element <TT>0x0000</TT>
318 exists for this Group) <br>
319 or he doesn't want to deal with <TT>SeqEntry</TT> that belong to a
320 <TT>Shadow group</TT> (every time it's possible
321 -'true length' Sequence-)<br>
322 when he parses all the Dicom files within a given directory.<br>
325 gdcm::DicomDir *f = new gdcm::DicomDir();
326 f->SetLoadMode(NO_SEQ); | depending on what
327 f->SetLoadMode(NO_SHADOW); | you want *not*
328 f->SetLoadMode(NO_SEQ | NO_SHADOW);| to load from the files
329 f->SetLoadMode(NO_SHADOWSEQ); | within the root directory
330 f->SetDirectoryName(rootDirectoryName);
333 <b>Don't</b> use any longer old deprecated style: <br>
335 gdcm::DicomDir *dcmdir = new gdcm::DicomDir(dirName, true);</TT><br>
341 <LI> No more trouble when the 'endianess' switches within Sequences.
342 <LI> No more trouble with 'no length Sequences' belonging to a
343 <TT>Shadow Group</TT> when they are 'Implicit VR'.
344 <LI> The difference between <TT>MONOCHROME1</TT> (low values = bright,
345 high values = dark) and <TT>MONOCHROME2</TT> (low values = dark,
346 high values = bright) is now taken into account.<br>
347 It's no longer up to the user to change the pixels value
348 <LI> Writing a 'True Dicom' image after reading an <TT>ACR-NEMA</TT> image
349 does not request any longer from the user to build up
350 'manually' the Meta Elements group (<TT>0x0002</TT>)
351 <LI> Old '24 Bits' <TT>ACR-NEMA</TT> are now correctly re-written
352 in <TT>DICOM V3</TT> mode.
353 <LI> Element <TT>0x0000</TT> of <TT>Shadow groups</TT> is always forced to be a
354 <TT>ValEntry</TT> and its <TT>VR</TT> is forced to <TT>UL</TT>
358 <LI> A.P.I. breaking modifications (since previous version : <TT>1.0</TT>)
360 <LI> NEVER more API breaking modifications !!!
366 <LI> Use of <TT>Implicit Value Representation</TT> writting mode may
367 causes troubles, when there are some <TT>SQ</TT> belonging to a
368 <TT>Shadow Group</TT>. <br>
369 Better you use <TT>Explicit Value Representation</TT> writting mode ...
370 <LI> Troubles on 'Big endian' processors (i.e. Apple/Motorola, SunSparc
371 ...) when writting 16 Bits images.
372 <LI> Troubles on 64-bits processors.
379 <!#######################################################################>
380 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
382 <A CLASS="anchor" NAME="NewsVersion1_0">
383 <B>Version 1.0 (Feb 14 2005)</B></A>
389 <a href="Doc1.0/uml-gdcmV1.0.pdf">gdcm 1.0 UML Class Diagram</a> version.
390 <LI> <a href= "Doc1.0/html.user/index.html">User Documentation"</a>
391 <LI> <a href= "Doc1.0/html.developper/index.html">Developper
393 <LI> Final check of the jpeg sub-library: all 'classical' jpeg
394 compressed Dicom files can be read<br>
395 <LI>All the previously gdcm-breaker images are now readable<br>
396 <LI> A huge number of memory leaks removed
397 <LI> Improvement of write process
401 <LI> A.P.I. breaking modifications (since previous version : <TT>0.6</TT>)
403 <LI> Use of <TT> namespace</TT> : all the methods formerly named
404 <TT>className::gdcmXxx()</TT> are now named <TT>className::Xxx()</TT>
405 <br> End user will have to call them as <TT>gdcm::className::Xxx() </TT>
406 <LI> a <TT>gdcm::Document</TT> is now specialized in :
408 <LI> <TT>gdcm::DicomDir</TT>
409 <LI> <TT>gdcm::File</TT>
411 <LI> a <TT>gdcm::DicomElementSet</TT> is composed of a set of
412 <TT>gdcm::DicomDocEntry</TT>
413 <LI> a <TT>gdcm::DicomDocEntry</TT> can be :
415 <LI> a <TT>gdcm::ContentEntry</TT>, specialized in :
417 <LI> <TT>gdcm::ValEntry</TT>
418 <LI> <TT>gdcm::BinEntry</TT> (no longer a specialization of
419 <TT>gdcm::ValEntry</TT>)
421 <LI> a <TT>gdcm::SeqEntry</TT>
423 <LI> Removal of useless accessors <TT>GetXxxByname</TT>, <TT>SetXxxByname</TT>
424 <LI> Renaming of accessors <TT>GetXxxByNumber</TT>, <TT>SetXxxByNumber</TT>
427 <LI> <TT>GetEntryByNumber
428
429 --> GetEntryValue</TT>
430 <LI> <TT>GetEntryLengthByNumber --> GetEntryLength</TT>
431 <LI> <TT>GetEntryOffsetByNumber --> GetEntryOffset</TT>
432 <LI> <TT>GetEntryVRByNumber
433 --> GetEntryVR</TT>
435 <LI> <TT>GetDocEntryByNumber
436 --> GetDocEntry</TT>
437 <LI> <TT>GetValEntryByNumber
438 --> GetValEntry</TT>
439 <LI> <TT>GetBinEntryByNumber
440 --> GetBinEntry</TT>
441 <LI> <TT>GetSeqEntryByNumber
442 --> GetSeqEntry</TT>
447 <!#######################################################################>
448 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
450 <A CLASS="anchor" NAME="NewsVersion0_6">
451 <B>Version 0.6 (June 8 2004)</B></A>
454 This version will be used by Insight Tool Kit
455 (<a href="http://www.itk.org">ITK</a> 2.0) at the beginning of 2005.<br>
456 It's not yet packaged ...<br><br>
457 <LI> <a href= "Doc0.6/html.user/index.html">User Documentation"</a>
458 <LI> <a href= "Doc0.6/html.developper/index.html">Developper Documentation"</a>
459 <LI> The new <TT>gdcmDocument</TT> class is a parent class of
460 <TT>gdcmHeader</TT> class and <TT>gdcmDicomDir</TT> class.
461 <LI> Massive modifications in the Class Diagram :
463 <LI> any dicom related file is a <TT>gdcmDocument</TT>
464 <LI> a <TT>gdcmDocument</TT> can be :
466 <LI> a <TT>gdcmHeader</TT>, if it contains pixel data
467 <LI> a <TT>gdcmDicomDir</TT>, if it contains only informations
468 on the files in a given directory
471 <LI> a <TT>gdcmDocument</TT> is_a <TT>gdcmElementSet</TT>,
472 composed of a set of <TT>gdcmEntry</TT> separated into :
474 <LI> <TT>gdcmValEntry</TT><br>
475 a specialization of <TT>gdcmValEntry</TT>, for 'non
476 <TT>std::string</TT> representable' values is
477 <TT>gdcmBinEntry</TT>
478 <LI> <TT>gdcmSeqEntry</TT> (VR = <TT>SQ</TT>, i.e Dicom Sequences)<br>
479 they are dealt as tree-like structures :<br>
480 - a <TT>gdcmSeqEntry</TT> is considered as a set
481 of <TT>gdcmSQItem</TT>,<br>
482 - a <TT>gdcmSQItem</TT> is_a <TT>gdcmElementSet</TT>, composed
483 of <TT>gdcmDocEntries</TT>, recursively <br>
486 <LI> Improvement of the jpeg sub-library: jpeg
487 compressed Dicom files (lossless and lossy)
488 might be read (check-it out)
491 <!#######################################################################>
492 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
494 <A CLASS="anchor" NAME="NewsVersion0_4">
495 <B>Version 0.4 (February 6 2004)</B></A>
499 <LI> <a href="Doc0.4/uml-gdcmV0.4.pdf">gdcm 0.4 UML Class Diagram</a>.
500 <LI> <a href= "Doc0.4/html.user/index.html">User Documentation"</a>
501 <LI> <a href= "Doc0.4/html.developper/index.html">Developper Documentation </a>
503 <LI> Introduction of a jpeg sub-library: some very simple jpeg-lossy
504 compressed Dicom files might be working (check-it out).
505 <LI> And also, fewer memory leaks, cleaned-up stl usage (should work
506 with gcc-3.x), python disutil installer (see file setup.py)
507 supporting both Swig and vtk wrapping.
508 <LI> Introduction of a RLE (Run-Time Encoding) library
509 <LI> Color images (RGB or Palette Color) are dealt with
510 <LI> Confusing names <TT>gdcmPatient</TT>, <TT>gdcmStudy</TT>,
511 <TT>gdcmSerie</TT>, <TT>gdcmPatient</TT> changed to
512 <TT>gdcmDicomDirPatient</TT>, <TT>gdcmDicomDirStudy</TT>,
513 <TT>gdcmDicomDirSerie</TT>, <TT>gdcmDicomDirPatient</TT>
517 <!#######################################################################>
518 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
520 <A CLASS="anchor" NAME="NewsVersion0_3">
521 <B>Version 0.3 (July 8 2003)</B></A>
524 <LI> <TT>gdcmFile</TT> class now enables acces to the data
525 i.e. the image[s] content. Previously only parsing of the
526 Dicom header was available through usage of <TT>gdcmHeader</TT>
528 <LI> a <A HREF="http://public.kitware.com/VTK/">VTK</A> plugin
529 of gdcm is now available through the <TT>vtkGdcmReader</TT>
530 vtk class (see it as a vtk wrapper of gdcm), which enables
532 <LI> Loading of a single image,
533 <LI> Loading of a stack of images from multiple Dicom files,
534 <LI> this class is wrapped for vtkPython (by using native vtk
537 <LI> Introduction of a jpeg sub-library: lossless-jpeg
538 compressed Dicom files work.
539 <LI> <TT>vtkgdcmViewer</TT> allows easy displaying of single/multiframe
540 GreyLevel/RGB/PaletteColor images
543 <!#######################################################################>
544 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
546 <A CLASS="anchor" NAME="NewsVersion0_1">
547 <B>Version 0.1 (April 1 2003)</B></A>
549 <!#######################################################################>
550 <HR size="1"><ADDRESS style="align: right;"></ADDRESS>
552 <A CLASS="anchor" name="NewsVersion0_1">
553 <B>Version 0.0 (March 14 2003)</B></A>
555 <HR size="1"><ADDRESS style="align: right;"></ADRESS>