ivoflipse / pydicom Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/pydicom
Automatically exported from code.google.com/p/pydicom
Find more DICOM files for the test suite.
* newer DICOM files
* if possible more variations such as BigEndian, multi-frame images,
compressed images
Original issue reported on code.google.com by [email protected]
on 13 Sep 2008 at 3:15
Look into ITK/VTK plugins -- may be useful since can be bundled together in
python(x,y).
Original issue reported on code.google.com by [email protected]
on 24 Dec 2008 at 4:58
dicom.ReadFile() fails with unpack running out of data on 64-bit systems.
Original issue reported on code.google.com by [email protected]
on 4 Oct 2008 at 12:17
I have turbogears-based code which shows datasets through a javascript
interface with ability to expand and collapse nodes. Would like to add this
in but using a simpler interface like cgi.
Original issue reported on code.google.com by [email protected]
on 8 Sep 2008 at 3:14
Use python logging module to:
* record the attributes as they are read or written
* capture assumptions -- e.g. with no header found
* capture any warnings about dicom non-compliance
* capture detailed information for exceptions
Original issue reported on code.google.com by [email protected]
on 23 Sep 2008 at 9:25
Find example JPEG syntax files and make sure they can be read (but leave
decompression to the user).
Original issue reported on code.google.com by [email protected]
on 21 Sep 2008 at 3:12
Using the following code on the provided image:
dcm = dicom.ReadFile( 'image.dcm' ) # Attached to this issue as 7-zip
dcm.PatientsName = 'Blah'
dcm.SaveAs( 'image2.dcm' )
Gives the following exception:
argument 1 must be string or buffer, not list
The save fails because tag (0045,1029) is a VR=UN with VM=1, yet the values
are stored in a list (must be stored in string to save). The value stored
in the dicom file is a 'delimited' value of "1356\1" which is why I'm sure
it's being stored as the list ["1356", "1"]. However, if the VM is 1,
and/or VR type UN requires a string to save, then the loading code should
load the value "1356\1" as a string literal and not a python list.
Original issue reported on code.google.com by [email protected]
on 18 Dec 2008 at 10:21
Attachments:
As of mid-Sept/08, python 3.0 release candidate is out. This changes many
features of the language, some in ways that are not backward compatible.
pydicom code will have to change (perhaps a fork) to run under python 3.0.
It will be some time before python 3.0 is widely adopted, however.
Original issue reported on code.google.com by [email protected]
on 26 Sep 2008 at 8:16
Investigate the follow methods to deliver pydicom:
* pypi Python Packaging index http://pypi.python.org/
* easy_install (linked to the above, I think)
* others?
Original issue reported on code.google.com by [email protected]
on 14 Sep 2008 at 2:54
Some dictionary items are OW/OB, 'US or SS' etc. See if can resolve which
was actually used and read with appropriate byte swapping if required.
* e.g. PixelData is OB for encapsulated formats -- PS 3.5-2008 A.4
Original issue reported on code.google.com by [email protected]
on 12 Oct 2008 at 1:44
If header missing, should be more careful about auto-detecting whether is
DICOM or not. Can for example compare group value to guess if big or little
endian.
Original issue reported on code.google.com by [email protected]
on 16 Oct 2008 at 10:48
Code could be simplified by using python's Decimal object for VR=DS types -
- will track number of figures automatically, print nicely, etc. Math
operations should be unaffected.
Original issue reported on code.google.com by [email protected]
on 14 May 2009 at 12:14
Dictionary based on 03 standard. Need to update to 2008 documents. This
will entail:
* adding tags to the dictionary
* dealing with more "xx" groups and "xxx" elements
* will update dictionary to include flag for whether the tag is retired
* add a boolean attibute property isRetired
* ? consider one-time pickling operation to speed loading since
dictionary will be much larger
Original issue reported on code.google.com by [email protected]
on 16 Sep 2008 at 3:34
Python 2.3 doesn't know euc_kr and iso2022_jp encodings used in latest
revisions in repository. Need to remove this test or find alternatives
based on python version.
Original issue reported on code.google.com by [email protected]
on 22 Dec 2008 at 6:43
Attribute class str() display usually truncates large items. But if
multi-valued (a list) then len(value) can be small (the number of items in
the list) but the printed list very large. Saw this in Senographe file with
LUTs.
Need to check the overall length of the output in case of lists.
Original issue reported on code.google.com by [email protected]
on 10 Dec 2008 at 4:33
Create a new module to turn pydicom into a plug-in for PIL. Instructions at
http://www.pythonware.com/library/pil/handbook/decoder.htm
Original issue reported on code.google.com by [email protected]
on 8 Oct 2008 at 4:20
1. I'm working with mammography data from GE Senographe Essential burned
from the Review Workstation. There is a null sequence (0008, 1032)
ProcedureCodeSequence. pydicom seems to place all tags past that sequence
inside of it such that PatientsName, PatientsID, etc.. are considered part
of the sequence instead of in the document root as they should be.
I loaded the file in other dicom apps (Jdicom, ClearCanvas, Matlab), and
all apps parse these files correctly. Perhaps there is a bug handling null
sequences?
Using pydicom 0.9.1, WinXP 32-bit Python 2.5.2
Original issue reported on code.google.com by [email protected]
on 24 Nov 2008 at 7:40
As adding more images, is cluttering the test directory. Restructure so
images have their own subfolder.
Original issue reported on code.google.com by [email protected]
on 16 Oct 2008 at 10:46
Original code had Numeric library support for coercing image data to the
right form. Need to resurrect that, and update to the latest library (numpy?).
Original issue reported on code.google.com by [email protected]
on 13 Sep 2008 at 12:50
Need code to handle encrypted content as per e.g PS 3.15-2008
Page 32
Original issue reported on code.google.com by [email protected]
on 5 Apr 2009 at 3:49
1. Open DCM multi-frame file
2. Can't read frames or treat it as well
I'm wondering if pydicom supports multi-frame :?
What version of the product are you using? On what operating system?
Latest version with WinXP
Original issue reported on code.google.com by [email protected]
on 14 May 2009 at 8:37
filereader.ReadFileMetaInfo() can avoid reading a whole file but only gives
limited information. Should add the ability to still read all information
but delay reading of large *values* (e.g. pixels, dose grid) until actually
needed.
Possible solution: have a flag in Attribute instance to mark whether has
actually been read in. A danger of this is that one has to re-open the file
to read those values ... if any changes have been made to the file then
this could be dangerous. Will need a flag for date/time stamp and/or
recheck the instance UID to make sure is same file.
Original issue reported on code.google.com by [email protected]
on 1 Dec 2008 at 10:35
Need one or more wiki pages to explaing the classes and methods available
in more detail.
Original issue reported on code.google.com by [email protected]
on 13 Sep 2008 at 12:45
What steps will reproduce the problem?
1. read_file() for dicom file without header info
2. didn't add ds.TransferSyntaxUID checked in PixelArray (corrected in
r109)
3. PixelArray reported as not a member of Dataset
So, root problem is that raised errors were somehow silenced ... and wound
up going to __getattr__ to find a property which should have existed.
Original issue reported on code.google.com by [email protected]
on 4 May 2009 at 7:42
Write code to parse DICOMDIR files (need a short one for unit tests also).
Original issue reported on code.google.com by [email protected]
on 15 Sep 2008 at 11:04
See http://groups.google.com/group/pydicom/browse_thread/thread/2e38bcdbf57891e
5.
The entry for (0018,9445) (retired) has blank entries, and should get some
kind of definition.
Original issue reported on code.google.com by [email protected]
on 10 Apr 2009 at 2:51
[deleted issue]
Investigate BSD or MIT licenses, convert source files to refer to new license.
Original issue reported on code.google.com by [email protected]
on 14 Dec 2008 at 3:10
Util directory not added to setup.py, so is missing from installed
distributions.
Original issue reported on code.google.com by [email protected]
on 9 Oct 2008 at 2:36
A pydicom "gotcha" comes from disconnect between Dataset.pixel_array
property and Dataset.PixelData. The latter is actually in the Dataset (a
dict), the former is created from it but changes are not written back
unless ds.PixelData is explicitly set with e.g. pixel_array.tostring().
Possible solutions:
* always require Numpy, always convert pixel data into numpy array. Problem
is this requires decompressing JPEG data (which is not available yet in
pydicom and would possibly waste time on a step that might never be used if
the code is not modifying pixels).
* link pixel_array and PixelData together. if pixel_array is asked for,
keep reference to it in dataset instance and automatically do tostring()
before data is written. But what if user modified pixel_array and modified
PixelData directly (current code would do that using the tostring() method
mentioned above). Could see which one was modified most recently and use
that as the definitive final value, or could throw an error or warning of
possible inconsistent pixel data changes.
This idea means PixelData probably needs to be redefined as a property so
can flag writes to it. That makes it 'special' and different than other
items in the Dataset dict, but perhaps that is necessary.
I like the second idea better, but am hoping someone can come up with an
even cleaner solution.
Original issue reported on code.google.com by [email protected]
on 28 May 2009 at 2:58
There may be incompatibilities with python 2.6. Test and see if pydicom
works with it.
Original issue reported on code.google.com by [email protected]
on 21 Oct 2008 at 3:54
Rename variables, functions etc according to standard python style
conventions, at least for most things.
In particular, change ReadFile to read_file etc. (can keep old one for
backwards compatibility).
Original issue reported on code.google.com by [email protected]
on 13 Oct 2008 at 3:50
See (0008,0005). PS-3.5-2008, 6.1.2.3 Encoding of character repertoires
Original issue reported on code.google.com by [email protected]
on 15 Sep 2008 at 11:35
To simplify package release, need automated tests (ideally unit tests, but
possibly scripts) to run the example programs (in examples directory) and:
* at least ensure they do not throw errors
* ideally, verify that they give the expected results
As unit tests,
* create test_examples.py file in "test" directory from copy of an existing
testset
* use execfile to run programs?
* capture stderr and ensure no errors thrown?
* capture stdout and sample for some expected printed values?
Have to consider how to run GUI examples -- i.e. dicomtree.py. May not be
able to automate checking, in which case it should not go in unittests.
Original issue reported on code.google.com by [email protected]
on 20 May 2009 at 1:38
See r95, r96. Temp fix put in for "Other Patient IDs" colliding with "Other
Patient IDs Sequence" when CleanName drops the "Sequence". Should make a
more general solution that "Sequence" is kept for any name collisions like
this.
Original issue reported on code.google.com by [email protected]
on 13 Feb 2009 at 2:32
I think I saw some published dictionaries for private tags from some of the
vendors -- e.g. Siemens, GE, Philips. "It would be nice" to have
dictionaries available for such private tags.
Needs a little thought since tag numbers could conflict between different
vendors. May have to check the tags near start of dataset (e.g.
Manufacturer (0008,0070)?) and attach only that vendor's private tags
dictionary to the dataset instance somehow.
Original issue reported on code.google.com by [email protected]
on 24 Jan 2009 at 4:04
Create a UID class which subclasses string and prints the name of a UID
(e.g. transfer syntax name) rather than the 1.2.480...
Original issue reported on code.google.com by [email protected]
on 16 Oct 2008 at 10:33
It's considered bad practice for the library name and it's import name to
be different -- it is confusing for users.
So, should change the import name to "pydicom", which would require:
* update all documentation to use "pydicom" rather than "dicom"
* update all example files
* ?possibly provide a converter tool to search and replace:
* from dicom import --> from pydicom import
* import dicom --> import pydicom
* dicom. --> pydicom.
Original issue reported on code.google.com by [email protected]
on 17 May 2009 at 6:12
From DICOM standard 08_05 Table 6.2-1, need to add readers and writers for
the following:
* OF - other float string
* UT - unlimited text -- note multiple not allowed, backslash character
just text
Also see if can find files with these in them to test with.
Original issue reported on code.google.com by [email protected]
on 15 Sep 2008 at 11:26
What steps will reproduce the problem?
1. Read a dicom file which is non-standard in not having file meta info
(preamble and group 2)
2. Write it out again.
Current code will also write without the meta info. Need to put in required
tags using pydicom's own Implementation Class UID, (optional) version, etc.
Group 2 elements [0, 1, 2, 3, 0x10, 0x12] are required by the DICOM standard.
Should also have a switch to put pydicom Implementation Class UID in even
if read-in file had proper meta info, as pydicom will have been the last to
process the file.
Original issue reported on code.google.com by [email protected]
on 1 Oct 2008 at 3:26
Allow Tags to be created from lists (rather than just tuples) or perhaps
any object which can "unpack" into two items:
group, elem = some_object
Implementation:
In tag.py, replace isinstance check for tuple to a try-except block using
unpack line like above. Write unit tests in test_tag.py to at least add a
list instance to the tests of constructing tag instances. Add tests to
test_dataset.py testContains, at least one for a list like "[0x10,0x10] in
ds".
Original issue reported on code.google.com by [email protected]
on 28 May 2009 at 2:09
As outline in PydicomUserGuide, can delete a data element from a dataset using
the tag. But should be able to do so using the name, just as for getting and
setting DICOM data elements, e.g. del ds.PatientId
Steps:
* add __delattr__ method to Dataset in dataset.py:
(The code should be similar to that in __setattr__)
* check if attribute already exists (i.e. is not a DICOM name), delete
normally if it is.
* If not a normal attribute, then get tag by TagForName(name) and delete the
tag from the dataset if it exists; if not, raise appropriate error
(AttributeError)
* write unit tests -- need to test delete of attributes that exist and that
attempt to del one that doesn't exist raises AttributeError
* modify example programs that delete data elements (anonymize.py for sure;
others?) to use the new format with the name
Then I will need to also edit the deletion part of the PydicomUserGuide to
show how to use the new method.
Original issue reported on code.google.com by [email protected]
on 12 Jun 2009 at 2:26
Let the user set visual preferences such as:
* max width of tag name displayed
* whether the VR is shown or not
* whether UI's are shown as descriptive names (if available) or dotted
numbers
* whether file position is shown at start of line
* max depth of nested structures to show
Original issue reported on code.google.com by [email protected]
on 21 Oct 2008 at 4:24
It looks like filewriter module does not recalc group length fields except
for file meta info section. Should make this the case for all groups.
Original issue reported on code.google.com by [email protected]
on 11 Dec 2008 at 3:48
Dataset does not give the best tab completion since dicom dataset
attributes are not actually object properties directly but are looked up.
See if can make tab completion (on ipython, perhaps others) work.
Original issue reported on code.google.com by [email protected]
on 18 Dec 2008 at 5:47
I ran into this problem while working with some new imagery.
With the attached imagery:
dcm = dicom.ReadFile( 'img3.dcm' )
dicom.WriteFile( 'img3out.dcm', dcm )
You receive "NotImplementedError: WriteDataElement: unknown Value
Representation 'US or SS or OW'".
This error raises when trying to write the tag (0028, 3006) LUTData.
Clearly the writing for this VR is not implemented, but easy to fix since
US, SS and OW are all some binary 16 bit values (ss and us have VM of 2,
where OW can be a large buffer of values).
Note: The following solution works for my needs under limited testing.
First, since US and SS both use write_OWvalue in filewriter.py, add 'US or
SS or OW':write_OWvalue to the writers dictionary.
Now pydicom will most likely raise an error in the write_OWvalue method
because it sees a list instead of a buffer of shorts. This is because the
DataElement constructor does not correctly capture the data for VR 'US or
SS or OW'.. It treats the buffer as a free text type VR and splits on the
text delimiter giving you a list of strings if the delimiter exists within
your data.. To treat the data as binary, do the following:
in the DataElement Constructor:
under _setvalue(self,val)
if isString(val) and self.VR not in \
['UT','ST','LT', 'FL','FD','AT','OB','OW','OF','SL','SQ','SS',
'UL','US', 'OW/OB', 'UN', ## ADD THIS ->## 'US or SS or OW']:
Now this should work:
dcm = dicom.ReadFile( 'img3.dcm' )
dicom.WriteFile( 'img3out.dcm', dcm )
Original issue reported on code.google.com by [email protected]
on 24 Apr 2009 at 2:30
Attachments:
As suggested by brandon.forrester in issue35, could look into connection of
pydicom to pyglet (http://www.pyglet.org/). It's a good fit with pydicom --
simple installation, very open (BSD) license.
This issue may not require much addition/modification of pydicom code --
perhaps documentation may be sufficient (could be added to
WorkingWithPixelData page).
Original issue reported on code.google.com by [email protected]
on 28 May 2009 at 2:18
1. The package fails to import on earlier versions of python (seen on 2.3.5
on Windows)
{{{
File "C:\Python23\Lib\site-packages\dicom\tag.py", line 28, in __new__
raise OverflowError, "Tags are limited to 32-bit length"
OverflowError: Tags are limited to 32-bit length
}}}
2. setup.py script also uses package_data which python docs claim is new in
python 2.4.
Original issue reported on code.google.com by [email protected]
on 8 Sep 2008 at 3:09
pydicom can read JPEG files, but the pixel data remains compressed. Should
investigate incorporating JPEG code to allow at least decompression of read
images.
Original issue reported on code.google.com by [email protected]
on 8 Oct 2008 at 12:40
Rename Attribute to DataElement to more closely follow DICOM standards.
Attributes are what they are called in IODs, then Attributes are encoded
into Data Elements in actual DICOM files.
Original issue reported on code.google.com by [email protected]
on 16 Oct 2008 at 10:45
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.