Skip to content

Specify StudyDescription when creating DICOMSeg ? #384

Closed

Description

@salimkanoun

Hi there, thanks for this very helpfull library,

Correct me if i'm wrong but I didn't find anyway to add StudyDescription to a generated DICOMSeg,

In highdicom.seg.Segmentation and highdicom.SOPClass there is not attribut for StudyDescription,

It is normal or just a forgotten dicom tag ?

Best regards,

Salim

Activity

  1. JoaoSantinha commented on Dec 27, 2025

    @JoaoSantinha

    Hi @salimkanoun ,

    If I am not mistaken it should have the same study description of the original study description of the DICOM series for which the segmentation was created. Unfortunately, I am not able to test it right now, but hopefully it will help. Additionally, that tag is optional and study UID should allow for the segmentation to be under the right study

  2. salimkanoun commented on Dec 27, 2025

    @salimkanoun
    Author

    Dear @JoaoSantinha thanks for your answer !
    I'm using copy_patient_and_study_information but the resulting dicom seg does not have the study description tag

  3. CPBridge commented on Dec 27, 2025

    @CPBridge
    Collaborator

    Hi @salimkanoun, @JoaoSantinha is correct, the "StudyDescription" is copied from the source images because it should match the "StudyDescription" in every other file in the study (being a study-level attribute). If you are not seeing it in the segmentation, you should find that that is because it is missing in the source files, thus it is "correct" to omit it from the segmentation.

    If you really need to override this (though I wouldn't recommend it because StudyDescription should be consistent throughout the study), you can do this using the pydicom-level API and simply set it after construction (seg.StudyDescription = "My Study").

    If you check and find that study description is present in the source images but missing from the Segmentation, then there is indeed a bug in the library that we should fix.

  4. CPBridge commented on Dec 27, 2025

    @CPBridge
    Collaborator

    Also, you should not call the copy_patient_and_study_information directly, this is done for you by the Segmentation constructor. I actually want to deprecate that method at some point, it was a mistake to make it public in my opinion. I think I'll add something to the docstring to make this clearer

  5. CPBridge commented on Dec 27, 2025

    @CPBridge
    Collaborator

    I think I'll add something to the docstring to make this clearer

    See #385

  6. salimkanoun commented on Dec 27, 2025

    @salimkanoun
    Author

    Dear all, thank you so much for you support,

    I redone some unit testing in my code, you're correct the StudyDescription is well copied from original study, sorry for the false positive report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions