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