Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixel data #214

Merged
merged 8 commits into from
Apr 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dicompylercore/dicomparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ def __init__(self, dataset, memmap_pixel_array=False):
raise AttributeError
else:
raise AttributeError
# Remove the PixelData attribute if it is not set.
# i.e. RTStruct does not contain PixelData and its presence can confuse
# the parser
if "PixelData" in self.ds and self.ds.PixelData is None:
delattr(self.ds, 'PixelData')
if memmap_pixel_array:
self.filename = dataset
self.pixel_array = self.get_pixel_array
Expand Down