]> Creatis software - gdcm.git/blob - TODO
ENH: Adding todo for automatic recognition of DICOM dict
[gdcm.git] / TODO
1 -----------------------------------------------------------------------------
2 Proposed Template of an entry in this TODO:
3 (Note: Date is the date of registering of first demand.)
4
5 -------------
6 Description:
7 Date:
8 Attributed:
9 Details:
10 Comments:
11 -------------
12
13 -----------------------------------------------------------------------------
14 Description: Add testing of valid dictionary
15 Date: 2005 Aug 31
16 Attributed: Mathieu
17 Details:
18 Since that now private/shadow dictionary are available
19 it would be nice to start implementing an automatic mode of loading
20 those dictionary as we read the public one.
21 Comments:
22 -----------------------------------------------------------------------------
23 Description: gdcm::SerieHelper / UID / set of rules
24 Date: 2005 Aug 30
25 Attributed: Mathieu
26 Details:
27   gdcm::SerieHelper now offer a mechanism to add rules to sub select image 
28 as we iterate over them within a subdirectory structure. But what if UID was too
29 restrictive ? Therefore UID subselection become only a good default rule, which
30 should ideally be removed when user need a specific task.
31 Comments:
32 -----------------------------------------------------------------------------
33 Description: Add testing of valid dictionary
34 Date: 2005 Aug 29
35 Attributed: Mathieu
36 Details:
37 It is potentially possible that user modifies the dictionary that gdcm provides
38 and this is also possible that the dictionary generated from pdf is buggy
39 (see 2001,xx5F. VR = SQ, VM = 1-n, from 
40 www.medical.philips.com/main/company/connectivity/assets/docs/dicomcs/mr91.pdf)
41 Therefore gdcm should check for any typo, and report it (if possible)
42 Comments:
43 -----------------------------------------------------------------------------
44 Description: Add kwsys as a subdir somewhere in gdcm
45 Date: 2004 Oct 8
46 Attributed: Mathieu
47 Details:
48   kwsys is a lightweight library developped by kitware, used in project like
49 ITK, VTK, CMake and ParaView. It runs and compile on almost any plateform with c++
50 compiler. And it provide a cross plateform approach to any kind of system call
51 (executing a process, killing a process, realpath, filename/directory management ...)
52 Comments:
53    * jpr : what does 'kwsys' stand for?
54 -----------------------------------------------------------------------------
55 Description: Extent reading support
56 Date: 2004 Oct 8
57 Attributed: Mathieu
58 Details:
59 Comments: All ITK/VTK readers support selecting extent. gdcm should support 
60 selecting extent before being inserted into ITK
61 -----------------------------------------------------------------------------
62 Description: gdcmDicomDir and SQItem creation
63 Date: 2004 Nov 16
64 Attributed:
65 Details: DicomDir creates some SQItem (by new). Then, it creates
66   the corresponding DicomDirPatient, etc. using the content of the SQItem
67   (the content is composed with some DocEntry's that can't be destroyed).
68   So, if the SQItem is deleted, then it's content is deleted to. But the 
69   DicomDirPatient, etc. use the content of the SQItem. Then, the SQItem can't
70   be deleted, and when have memory leaks
71 Comments : 
72    * JPR : Fixed
73 -----------------------------------------------------------------------------
74 Description: [BUG] Better handling of unfound Dicom dictionary.
75              When gdcm doesn't find the Dicom dictionary (because it's
76              path to the directory of dictionary is uncorrect, either
77              because the install relative layout was broken after file moves
78              or because the environnement variable GDCM_DICT_PATH is 
79              unpropely set), gdcm will:
80              1/ print a warning
81              2/ throw an exception (that is internaly UNcatched by gdcm)
82                 that in most cases provoques the caller application to
83                 exit uncleanly (uncatched excpetions in fine call abort() ).
84              Additionaly on Win32 the warning print isn't displayed because
85              exiting occurs prior to cerr or cout is flushed properly.
86 Date: 2004 Oct 15
87 Attributed:
88 Details: fixes (from dirty to clean)
89          1/ force Win32 to flush it's buffer so at least the user gets some
90             reason why it's application exited (when called in command
91             environement). Note: it looks like the "cerr << flush" fails. Sigh.
92          2/ within gdcm catch the exception, display a decent warning, and
93             return to caller.
94          3/ see the comment below on how to enhance the API and fix things
95             really cleanly.
96 Comments: ENH proposal:
97           The caller migth not be aware of the path to the dictionaries
98           on invocation of gdcm (think this path is set by the Interface
99           because the caller wants to skip the default gdcm dictionary in order
100           to provide his own ones e.g. another language based one).
101              Hence, gdcm should postpone the parsing of the default dictionary
102           instead of doing it on library entry.
103           This would enable two things:
104            - It would give a chance to the caller to set the path to
105              the dictionaries he whishes to use, through a call to
106              newly created DictSet::SetDictionaryPath( string ).
107            - It would avoid the burden of using the GDCM_DICT_PATH
108              environnement variable and enable GDCM CONTROL FROM WITHIN
109              THE API. Optionaly, if the caller didn't use the API to
110              provide his prefered path, gdcm could still default to 
111              GDCM_DICT_PATH...
112 -----------------------------------------------------------------------------
113 Description: vtk/vtkGdcmReader doesn't positionate the normal to the image
114 Date: 2004 Oct 1
115 Attributed:
116 Details: vtkGdcmReader::CheckFileCoherence() sets the DataOrigin[i]
117          but doesn't set the plane (image seen in 3D) normal (is it
118          possible any how). This plane normal could be extracted from 
119          the "orientation" info of the gdcmHeader ( refer to
120          grep "Orientation" Dicts/dicomV3.dic).
121          Problem exhibiting this defect: cine loop on a stack of images
122                whose Origin is correct, but whose normal is not set will
123                plainly suck !
124 Comments:
125         * vtkGdcmReader inherits from vtkImageReader which aggregates
126           a vtkTranform. vtkGdcmReader could store (when the user requires
127           it, see below) the origin/normal taken from the Dicom Header
128           within this vtkTransform (looks like a natural place to store
129           this spacial information).
130         * Both settings of the origin and/OR the normal of the plane (image)
131           should be an option defined with a flag (On/Off) in the
132           vtkGdcmReader...
133 -----------------------------------------------------------------------------
134 Description: test the private dictionary part.
135 Date: 2004 Sep 24
136 Attributed:
137 Details:
138 Comments:
139  * Frog: where can we obtain such a private/dictionary and the corresponding
140          Dicom file ? Any examples on-line ?
141  * jpr : some are in gdcm/Dicts (built from pdf documents found on constructors'
142         www sites.
143         When we check them against existing images, we see the are uncomplete
144         and unaccurate ...
145 -----------------------------------------------------------------------------
146 Description: generate methods based on VM.
147 Date: 2004 Jul 30
148 Attributed:
149 Details:
150  * cmake should parse le DICOM dictionary to generate methods like
151    gdcm???::SetImagePosition(int, int)
152    {
153      //generated content do not edit
154      ...
155    }
156    gdcm???::SetImageNumber(int)
157    {
158      //generated content do not edit
159      ...
160    }
161 Comments:
162  * Regrain: a dicom dictionary entry name is NOT UNIQUE [this means
163      two tags=(group, element) can share the same name].
164      What should the wrapper do in such a case !?
165  * Frog: what does VM stand for ?
166  * VM = Value Multiplicity
167 -----------------------------------------------------------------------------
168 Description: Add information on supported imagers (constructor/model)
169 Date: 2004 9 7
170 Attributed:
171 Details: in order to promote gdcm make a list (on the web pages)
172          of images successfully parsed based on a constructor/model ordering
173 Comments:
174  * frog: gdcmData only lists pathological images. How to collect
175          the ones gdcm works smoothly with (hopefully gdcmData is a small
176          subset of what we would like).
177   * jpr : gdcmData contains images that caus*ed* us some troubles.  
178           the aim of gdcm is to read *all* the images, from *all* the
179           constructors and *all* the models.
180           Better we do a 'gdcm Dicom Hall of Shame' with bugged header images,
181           explaining *why* the header is bugged.         
182 -----------------------------------------------------------------------------
183 Description: Add a GetVersion() global function.
184 Date: 2003 july 7
185 Attributed:
186 Details: This is to be used for version assertion with gdcmPython
187 Comments: Done (August 2005)
188 -----------------------------------------------------------------------------
189 * vtk/vtkGdcmHeader.cxx: if speed becomes a concern some changes can
190   be made at the cost of memory consumption (refer to header of 
191   vtk/vtkGdcmHeader.cxx)
192 -----------------------------------------------------------------------------
193 * gdcmElValSet::SetElValueLengthByNumber IMNSHO should be trashed.
194   It's only purpose is a onliner substitute to calling GetElValueByNumber
195   and then SetLength. This only obfuscates the caller code more than
196   clarifying it.
197   Besides the definition of gdcmElValSet::SetElValueLengthByNumber itself
198   it quite poor since it is a almost exact copy of
199   gdcmElValSet::GetElValueByNumber except for the returned code.
200   gdcmHeader::SetPubElValLengthByNumber (which is based on 
201   gdcmElValSet::SetElValueLengthByNumber) is used nowhere...
202 Comments:
203    * jpr : all the methods SetxxxByName were trashed.
204            all the methods SetxxxByNumber were renamed
205            A general method clean out was performed
206 -----------------------------------------------------------------------------
207 * All (or at least many of) the methods of gdcmHeader whose only arguments
208   are an ElValue* (e.g.  FindLength, FindVR, LoadElementValue...) can
209   be moved away to ElValue class on condition of transmitting the
210   gdcmHeader.fp attribute. This change should be considered since it
211   would allow those method to avoid artificial calls to ElValue::GetElement(),
212   ElValue::GetVR()...
213 -----------------------------------------------------------------------------
214 * Group length is not a unique tag in a file. Hence avoid putting it
215   in the element values dictionary without doing something smarter
216   (say, instead of storing the length store the group and the length
217    so we can related a length to a group).
218 -----------------------------------------------------------------------------
219 * GetPubElValByNumber doit faire la difference entre chaine vide 
220   et chaine pas trouve'e. Eventuellement raiser une exception ?
221 -----------------------------------------------------------------------------
222 * gdcmHeader::LoadElements only loads the element whose length is
223   below the specified size. When accessing the value of such an element
224   the content is unfound ! Find a decent way of loading the value on
225   explicit demand.
226 -----------------------------------------------------------------------------
227 * JPR: supply a method that only reads/loads (?) the Dicom elements 
228   given as a list(?).
229 -----------------------------------------------------------------------------
230 * JPR: gdcmHeader::CheckSwap() dans le cas ACR pas propre, degager tout de
231   suite si on a deduit que c'en est pas...
232 -----------------------------------------------------------------------------
233 * python /usr/lib/python2.2/site-packages/DaVaW/demo/dvwDcmReader.py
234   and load image /home/frog/cvs/DCMlib/Data/CT-MONO2-16-ankle.dcm
235   will yield wrong coloring scheme as opposed to 
236   affim filein=/home/frog/cvs/DCMlib/Data/CT-MONO2-16-ankle.dcm
237 -----------------------------------------------------------------------------
238 * gdcmFile should implement the following API:
239    gdcmFile WriteDicom;
240    WriteDicom.SetFileName("MyDicomFile.dcm");
241    string * AllTags = gdcmHeader.GetDcmTagNames();
242    WriteDicom.SetDcmTag(AllTags[5], "253");
243    WriteDicom.SetDcmTag("Patient Name", "bozo");
244    WriteDicom.SetDcmTag("Patient Name", "bozo");
245    WriteDicom.SetImageData(Image);
246    WriteDicom.Write();
247
248    Anonymize(ostream& output) {
249       a = gdcmFile("toto1");
250       a.SetPubValueByName("Patient Name", "");
251       a.SetPubValueByName("Date", "");
252       a.SetPubValueByName("Study Date", "");
253       a.write(output);
254    }
255 -----------------------------------------------------------------------------
256