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