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