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