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

For some DICOM sequences, the spacing isn't retrieved properly #475

Open
k5123 opened this issue Aug 30, 2022 · 5 comments
Open

For some DICOM sequences, the spacing isn't retrieved properly #475

k5123 opened this issue Aug 30, 2022 · 5 comments

Comments

@k5123
Copy link

k5123 commented Aug 30, 2022

For some DICOM sequences i have gotten here there doesn't seem a proper spacing information available (or it's stored differently), causing the "spacing" variable to be null, resulting in an import failure without clear error message.

The console shows:

RAM_FREE= 73786998784
RAM_TOTAL= 137357676544
Traceback (most recent call last):
File "invesalius\gui\import_panel.py", line 165, in OnDblClickTextPanel
File "invesalius\gui\import_panel.py", line 188, in LoadDicom
File "invesalius\pubsub\pub.py", line 74, in sendMessage
File "pubsub\core\publisher.py", line 216, in sendMessage
topicObj.publish(**msgData)
File "pubsub\core\topicobj.py", line 452, in publish
self.__sendMessage(msgData, topicObj, msgDataSubset)
File "pubsub\core\topicobj.py", line 482, in __sendMessage
listener(data, self, allData)
File "pubsub\core\listener.py", line 237, in call
cb(**kwargs)
File "invesalius\control.py", line 909, in OnOpenDicomGroup
File "invesalius\control.py", line 998, in OpenDicomGroup
UnboundLocalError: local variable 'spacing' referenced before assignment

code in question seems to be here:

self.matrix, scalar_range, spacing, self.filename = image_utils.dcmmf2memmap(filelist[0], orientation)

@tfmoraes
Copy link
Member

@k5123 you are using last InVesalius version (https://github.com/invesalius/invesalius3/releases/tag/v3.1.99998)?

@k5123
Copy link
Author

k5123 commented Sep 13, 2022

@k5123 you are using last InVesalius version (https://github.com/invesalius/invesalius3/releases/tag/v3.1.99998)?

Yes i am indeed.

@tfmoraes
Copy link
Member

@k5123 please, can you send me some of that dicom files? tfmoraes at cti.gov.br

@SKrywinski
Copy link

Any news on this? I am facing the same error...

@tfmoraes
Copy link
Member

@k5123 please, can you send me some of that dicom files? tfmoraes at cti.gov.br

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants