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

no attribute 'SOPClassUID' error #11

Open
gkowalski opened this issue Sep 23, 2024 · 12 comments
Open

no attribute 'SOPClassUID' error #11

gkowalski opened this issue Sep 23, 2024 · 12 comments

Comments

@gkowalski
Copy link

Trying to download various Accessions and the query works , but the "Import and Anonymize" always errors out with a no attribute 'SOPClassUID' error. Any ideas where to look :

2024-09-23 13:40:49,825 DEBUG GetStudyUIDHierarchies pydicom.data_element_generator.215 000000c2: 31 20                                  b'1 '
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2069
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2070 # Response Identifier
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0008,0052) CS [SERIES]                                 # 1 QueryRetrieveLevel
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0008,0054) AE [ALI_QUERY_SCP]                          # 1 RetrieveAETitle
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0008,0060) CS [DX]                                     # 1 Modality
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0008,103E) LO [LAT]                                    # 1 SeriesDescription
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0020,000D) UI [1.2.840.114350.2.35.2.798268.2.474531864.1] # 1 StudyInstanceUID
2024-09-23 13:40:49,826 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0020,000E) UI [1.2.392.200046.100.14.46852710304164419972798132664950223240] # 1 SeriesInstanceUID
2024-09-23 13:40:49,827 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0020,0011) IS [3]                                      # 1 SeriesNumber
2024-09-23 13:40:49,827 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2072 (0020,1209) IS [1]                                      # 1 NumberOfSeriesRelatedInstances
2024-09-23 13:40:49,827 INFO GetStudyUIDHierarchies pynetdicom.association._wrap_find_responses.2073
2024-09-23 13:40:49,827 ERROR GetStudyUIDHierarchies controller.project.get_study_uid_hierarchy.1550 'Dataset' object has no attribute 'SOPClassUID'
2024-09-23 13:40:49,827 DEBUG Thread-9 (run_reactor) pynetdicom.dsutils.decode.114 pydicom.read_dataset() TransferSyntax="Little Endian Implicit"```
@gkowalski
Copy link
Author

Interesting . I've verified by pulling down this same accession that all the images and SR have SOPClassUID in them ( Im using HOROS tool to download them ) . But in PACS it shows that there are 278 things in this accession. But when I pull them down I only get 276 actual DICOM objects of various SOPClassUID's . I'm wondering if HOROS is just dropping those other objects on the request to download.

@gkowalski
Copy link
Author

gkowalski commented Sep 23, 2024

ok , as a test I set the Storage classes permitted to only have one :

CT Image Storage   | 1.2.840.10008.5.1.4.1.1.1.2

Now it gets past the initial error and get :

2024-09-23 14:06:16,581 ERROR GetStudyUIDHierarchies controller.project.get_study_uid_hierarchy.1550 Unable to retrieve UID Hierarchy for reliable import operation via DICOM C-MOVE. QUERY Server did not return the number of instances in a series. Standard DICOM field (0020,1209) NumberOfSeriesRelatedInstances is missing in the query response.

Any way of playing with the tags it's expecting to see , or have it at least ignore them ?

@mdevans
Copy link
Collaborator

mdevans commented Sep 23, 2024 via email

@mdevans
Copy link
Collaborator

mdevans commented Sep 23, 2024 via email

@mdevans
Copy link
Collaborator

mdevans commented Sep 23, 2024 via email

@mdevans
Copy link
Collaborator

mdevans commented Sep 23, 2024 via email

@gkowalski
Copy link
Author

So I tried :

  • all Move levels ( all give errors )
  • I'm querying the Hospitals official PACS Machine ( McKesson ? ) , and I also flipped to their archive server which is a Synapse VNA frp, Fuji with the same results.
  • When I query I get :
    image

@gkowalski
Copy link
Author

at least importing from the filesystem works . I will try downloading the same accession with horos, then importing the same data set with anonymizer

@gkowalski
Copy link
Author

Well Import of those same images shows that some were QUARANTINE'ed . Dumped one

dcmdump IM-0003-0001.dcm

# Dicom-File-Format

# Dicom-Meta-Information-Header
# Used TransferSyntax: Little Endian Explicit
(0002,0000) UL 212                                      #   4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01                                    #   2, 1 FileMetaInformationVersion
(0002,0002) UI =KeyObjectSelectionDocumentStorage       #  30, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.840.113711.97687293.4.37484.747694861.365657005.125803] #  58, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit                    #  20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7238010.5.0.3.5.4]            #  28, 1 ImplementationClassUID
(0002,0013) SH [OSIRIX]                                 #   6, 1 ImplementationVersionName
(0002,0016) AE [MCW_SCU]                                #   8, 1 SourceApplicationEntityTitle

# Dicom-Data-Set
# Used TransferSyntax: Little Endian Explicit
(0008,0005) CS [ISO_IR 100]                             #  10, 1 SpecificCharacterSet
(0008,0016) UI =KeyObjectSelectionDocumentStorage       #  30, 1 SOPClassUID

ok m that's a wierd SOPClassUID .

@mdevans
Copy link
Collaborator

mdevans commented Sep 23, 2024 via email

@mdevans
Copy link
Collaborator

mdevans commented Oct 4, 2024

The file in the Unknown_user.zip: 1.2.840.113711.5.1.2519599859.1282256193.5688852202731011975.dcm

Has modality of "PR" (presentation state)

I configured an Anonymizer project to allow Modality PR and then retrieved this file from a Horos instance without error.

The other file: 1.2.840.113711.97687293.4.37484.747694861.365657005.125803.dcm is imported into Horos ok but the metadata is not viewable within Horos and this instance is not returned to Anonymizer for any Query.

As you picked up, this file has SOPClassUID=1.2.840.10008.5.1.4.1.1.88.59, Modality = KO => Key Object Selection Document Storage

As I previously stated, this modality is not available in the Project Settings/Modalities however, it can be set using Project Settings/Storage Classes

Scroll down and click: 1.2.840.10008.5.1.4.1.1.88.59

I was then able to import this file using File/Import Files.

@gkowalski
Copy link
Author

I'll give it a try.

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

2 participants