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