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

[BUG] STL generated for a prostate segmentation appears like a donut! #389

Open
MMelQin opened this issue Nov 4, 2022 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@MMelQin
Copy link
Collaborator

MMelQin commented Nov 4, 2022

Describe the bug
An prostate segmentation application is built with App SDK 0.5 and a model trained with MONAI core v1. It takes in a MR T2 series, creates the segmentation image, which then get written as DICOM Seg as well as transformed into a STL image. The former looks good, while latter looks like a squished donut.

Steps/Code to reproduce bug
Application code is supper simple since it uses the built-in MONAI bundle inference operator as well as others, though the model itself is proprietary, not to be shared publicly.

Expected behavior
The STL generated from the seg image (numpy + metadata) should represent closely the seg image

Environment details (please complete the following information)

  • OS/Platform: Ubuntu 20.04 LTS
  • Python Version: 3.8
  • Method of MONAI Deploy App SDK install: [pip, and from source]
  • SDK Version: 0.5

Additional context
The STL operator has been tested with the liver and spleen application and generated the correctly mesh image. Noted that those seg images have hundreds of slices, while the prostate MR has only around 20 slices, though, it is expected the 3D spacings should be correct irrespective of number of slices.

image

@MMelQin MMelQin added the bug Something isn't working label Nov 4, 2022
@MMelQin MMelQin added this to To do in v1.0.0 via automation Nov 4, 2022
@MMelQin MMelQin self-assigned this Nov 4, 2022
@MMelQin MMelQin moved this from To do to In progress in v1.0.0 Nov 4, 2022
@MMelQin
Copy link
Collaborator Author

MMelQin commented Apr 20, 2023

The issue has been reproduced on other segmentation applications too, eg. a Lung Seg with STL as one of the outputs. It is further confirmed that:

  • For the same app, if the input DICOM series has PatientPosition of HFS, both segmentation and STL output are fine, but with FFS, the STL image would appear squished.
  • It is further noted that, but yet to be investigated in detail, MONAI based algorithms tend to load image as canonical in the segmentation pre-processing, when input is NIfTI or other format. With MONAI Deploy App SDK, the in memory image that converted from DICOM series is directly used without "as canonical".

@MMelQin MMelQin removed this from In progress in v1.0.0 Apr 20, 2023
@MMelQin MMelQin added this to To Do in v0.6.0 via automation Apr 20, 2023
@MMelQin MMelQin removed this from To Do in v0.6.0 Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant