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