Issue 80 in dicompyler: MemoryError

7 views
Skip to first unread message

dicom...@googlecode.com

unread,
Oct 3, 2012, 9:31:45 AM10/3/12
to dicompyle...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 80 by phill...@gmail.com: MemoryError
http://code.google.com/p/dicompyler/issues/detail?id=80

What steps will reproduce the problem?
1. Open a large RT Dose file, with a >300 slice CT image set and >30
structures
2.
3.

What is the expected output? What do you see instead?
Expected: standard window, DVH window.
Instead:

What version of the product are you using? On what operating system?
Version 0.4.1-1, Windows XP

Please provide any additional information below.

Is it possible to increase the memory? It appeared that it used up to
about 650 MB of RAM and then crashed. Phil Taddei, phil...@hotmail.com

System Information and Problem Details:

Platform information:
System: Windows
Version: ('XP', '5.1.2600', 'SP3', 'Multiprocessor Free')
Python Version: 2.6.6
dicompyler Version: 0.4.1-1

dicompyler.dicomparser: DEBUG: Found ROI #4: orig_CTV_lower
dicompyler.dicomparser: DEBUG: Found ROI #6: orig_Brain-GTV
dicompyler.dicomparser: DEBUG: Found ROI #128: 50%IDLpt
dicompyler.dvhcalc: DEBUG: Calculating DVH of 1 brain_stem
dicompyler: ERROR: Unhandled exception: Traceback (most recent call last):
File "main.py", line 691, in Run
File "threading.pyo", line 484, in run
File "main.py", line 438, in LoadPatientDataThread
File "dicompyler\dvhcalc.pyo", line 21, in get_dvh
File "dicompyler\dvhcalc.pyo", line 58, in calculate_dvh
File "dicompyler\dicomparser.pyo", line 560, in GetDoseData
File "dicom\dataset.pyo", line 398, in _get_pixel_array
File "dicom\dataset.pyo", line 393, in _getPixelArray
File "dicom\dataset.pyo", line 357, in _PixelDataNumpy
MemoryError



dicom...@googlecode.com

unread,
Oct 3, 2012, 12:39:18 PM10/3/12
to dicompyle...@googlegroups.com

Comment #1 on issue 80 by phill...@gmail.com: MemoryError
http://code.google.com/p/dicompyler/issues/detail?id=80

On a different machine, Windows 7 with more physical memory, the patient's
files opened, but when I maximized the window, I got the following fatal
error:

Platform information:
System: Windows
Version: ('7', '6.1.7600', '', 'Multiprocessor Free')
Python Version: 2.6.6
dicompyler Version: 0.4.1-1

dicompyler.dvhcalc: DEBUG: Calculating DVH of 125 lungs
dicompyler.dvhcalc: DEBUG: Calculating DVH of 126 breast
dicompyler.dvhcalc: DEBUG: Calculating DVH of 127 skin
dicompyler.dvhcalc: DEBUG: Calculating DVH of 128 50%IDLpt
dicompyler: ERROR: Unhandled exception: Traceback (most recent call last):
File "P:\python\dicompyler-bdist\dist\baseplugins\2dview.py", line 611,
in OnMouseMotion
File "P:\python\dicompyler-bdist\dist\baseplugins\2dview.py", line 626,
in OnLeftIsDown
TypeError: unsupported operand type(s) for -: 'tuple' and 'Point'


dicom...@googlecode.com

unread,
Oct 4, 2012, 8:25:26 AM10/4/12
to dicompyle...@googlegroups.com

Comment #2 on issue 80 by lstrd...@gmail.com: MemoryError
http://code.google.com/p/dicompyler/issues/detail?id=80

I think the error above(second post) is relating to a mouse action in the
2dview.py too soon after changing the drawing state.

This same tuple/Point error used to occur, with the exe only, when
attempting to open a patient and double clicking the series in the tree
view rather than hitting the select button.

I think this might be the case when the 2dview is being redrawn for the
maximized mode. Could you try to hit ALT+SPACE to bring up the windows menu
and then press X to select maximize. But you will want to make sure the
mouse is NOT over the 2dview, so place it down in the start menu to prevent
this on maximize. That should prevent the tuple error and crash.

dicom...@googlecode.com

unread,
Oct 4, 2012, 11:25:29 AM10/4/12
to dicompyle...@googlegroups.com
Updates:
Owner: bastula

Comment #3 on issue 80 by bastula: MemoryError
http://code.google.com/p/dicompyler/issues/detail?id=80

Hi Phil,

lstrdean is correct regarding the mouse action in the 2D view. This was
resolved in Issue 62.

Regarding the first issue, I have never seen a memory issue before, but
granted I have not tried a large RT Dose dataset. This may be specific to
accessing the dose grid via NumPy via pydicom. I will need to investigate
what is the root cause, as this may be something that may have to be
corrected in an upstream library.

Thanks for the report.

dicom...@googlecode.com

unread,
Oct 5, 2012, 9:12:26 AM10/5/12
to dicompyle...@googlegroups.com

Comment #4 on issue 80 by phill...@gmail.com: MemoryError
http://code.google.com/p/dicompyler/issues/detail?id=80

Update: After I adjusted my mouse movement habits, as instructed, I was
able to read the RT Dose (and other) files on my Windows 7 workstation. It
has 8 GB of memory, but dicompyler only used about 950 MB of memory. I was
unable to open the files on my Windows XP workstation, which has less but
plenty of memory. Dicompyler only used a few hundred MB of memory before
crashing.

Phil


dicom...@googlecode.com

unread,
Oct 5, 2012, 12:06:33 PM10/5/12
to dicompyle...@googlegroups.com

Comment #5 on issue 80 by lstrd...@gmail.com: MemoryError
http://code.google.com/p/dicompyler/issues/detail?id=80

Might be able to quickly fix the memory error if the Numpy arrays are split
into multiple ones, any way to prevent a massive element wise operation. It
could be a problem with copying an over sized array. This memory error is a
pain with 32bit Numpy.

Phil, if you are handy with running Python I believe you can download a
newer version of Dicompyler which would include the mouse moving fix.
However this shouldn't affect the memory limit.

Also, I have worked with oversized RTDose files in the past. However my
files were created from a simulation system which included too much
precision in the decimals in printing. After I reduced this, the dose file
was reduced my hundreds of MB.

Reply all
Reply to author
Forward
0 new messages