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

Add support for more use-cases (2D, 3D, temporal) #10

Open
1 of 4 tasks
razorx89 opened this issue Jan 6, 2020 · 5 comments
Open
1 of 4 tasks

Add support for more use-cases (2D, 3D, temporal) #10

razorx89 opened this issue Jan 6, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@razorx89
Copy link
Owner

razorx89 commented Jan 6, 2020

Currently, only the 3D reading and writing is implemented (e.g. MRI, CT), similiar to the dmcqi project. In my opinion, this covers the most common use case for e.g. image analysis. Nevertheless, more imaging modalities and dimension setups should be supported.

  • 3D Imaging (e.g. MRI, CT)
  • DimensionIndexSequence[0]
    • DimensionIndexPointer: ReferencedSegmentNumber
    • FunctionalGroupPointer: SegmentIdentificationSequence
  • DimensionIndexSequence[1]
    • DimensionIndexPointer: PlanePositionSequence
    • FunctionalGroupPointer: ImagePositionPatient
  • Temporal 3D Imaging (e.g. MRI)
  • DimensionIndexSequence[0]
    • DimensionIndexPointer: ReferencedSegmentNumber
    • FunctionalGroupPointer: SegmentIdentificationSequence
  • DimensionIndexSequence[1]
    • DimensionIndexPointer: ?
    • FunctionalGroupPointer: ?
  • DimensionIndexSequence[2]
    • DimensionIndexPointer: PlanePositionSequence
    • FunctionalGroupPointer: ImagePositionPatient
  • 2D Imaging (e.g. CR)
  • DimensionIndexSequence[0]
    • DimensionIndexPointer: ReferencedSegmentNumber
    • FunctionalGroupPointer: SegmentIdentificationSequence
  • Temporal 2D Imaging (e.g. US)
  • DimensionIndexSequence[0]
    • DimensionIndexPointer: ReferencedSegmentNumber
    • FunctionalGroupPointer: SegmentIdentificationSequence
  • DimensionIndexSequence[1]
    • DimensionIndexPointer: ?
    • FunctionalGroupPointer: ?
@razorx89 razorx89 added the enhancement New feature or request label Jan 6, 2020
@razorx89 razorx89 added this to the 0.2.0 milestone Jan 6, 2020
@razorx89 razorx89 removed this from the 0.2.0 milestone Jun 2, 2020
@apint0-media
Copy link

Hi @razorx89

First of, nice work on raising this repo! 😃
Wanted to ask you if there are any plans to support the temporal 2D Imaging. I've been using pydicom-seg for cardiac cine images (which are 2D + t) and noticed that the final output is a 3D vol instead of a sequence of frames, but I do not have the expertise on how to change the dicom seg.

@razorx89
Copy link
Owner Author

Thank you! In theory I would like to support all mentioned use-cases. However, the DICOM standard is so flexible that it is not feasible to implement a solution on my own which cannot be opened by other frameworks or viewers. So if you could provide me example DICOM-SEGs generated by other tools or even clinically used software, I could have a look at how it is solved, especially regarding the dimensional indexing.

If you load your series in ITK, how is it actually stored? 3D volume or does ITK/SimpleITK correctly handle this as a temporal 2D volume?

@apint0-media
Copy link

Unfortunately, I do not have any reference example of DICOM-SEG files generated for 2D + t data, generated by other tools or clinical software, which hardens the problem.

The example I am trying to build, concerns a case with 25 frames, were an algo delineated 3 different classes. With that in mind, after loading the DICOM-SEG generated with pydicom-seg, the shape of the output data (with ITK) is (156,192,75,1). The 3rd dimension seems to concern the #_frames x #_classes. When loading the source input data with ITK the shape output is (156, 192, 25).

@razorx89
Copy link
Owner Author

I don't have a 2D+t series at hand, but I would imagine that SimpleITK loads the series with GetSize()==(156,192,25) and GetDepth()==25? That would be already a problem for me, because the spatial extent would be invalid and when encoding the DICOM-SEG I would have no clue about the temporal dimension. Former workarounds (just from a quick look at some search results) separated the series DICOMs by manual header interpretation and loaded several ITK images. Maybe that got easier with SimpleITK >=2.0. Would you be able to share the DICOM data (anonymized of course) and example segmentation?

The encoding/decoding would still be somewhat problematic, because I cannot find a reference implementation in other frameworks. dcmjs seems to also only support normal 3D volumes.

@apint0-media
Copy link

Yes, you are correct, GetSize() and GetDepth() gave those values. Thanks for the explanation, also have some thoughts that the constrains might be on how to deal with the temporal info. Regarding sharing an example case, I'm checking if internally we can share it.

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

No branches or pull requests

2 participants