Skip to content

Foreground Tissue Mask#4379

Merged
bhashemian merged 36 commits into
Project-MONAI:devfrom
bhashemian:tissue-mask
May 31, 2022
Merged

Foreground Tissue Mask#4379
bhashemian merged 36 commits into
Project-MONAI:devfrom
bhashemian:tissue-mask

Conversation

@bhashemian

@bhashemian bhashemian commented May 28, 2022

Copy link
Copy Markdown
Member

Fixes #4380
Prerequisite for #4014

Description

This PR implements ForegroundMask transform that creates a foreground mask with various thresholding. For digital pathology use cases, this transform is helpful to create sliding-window patches that covers only the tissue.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

bhashemian added 16 commits May 26, 2022 01:34
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian bhashemian linked an issue May 28, 2022 that may be closed by this pull request
@bhashemian bhashemian marked this pull request as ready for review May 28, 2022 21:06
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the new feature, it overall looks good to me, put some minor comments inline.

Comment thread monai/transforms/intensity/array.py
Comment thread monai/transforms/intensity/array.py Outdated
Comment thread monai/transforms/intensity/array.py
Comment thread monai/transforms/intensity/array.py Outdated
Comment thread monai/transforms/intensity/dictionary.py
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian bhashemian enabled auto-merge (squash) May 30, 2022 19:23

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick update, it overall looks good to me.
Put some minor comments inline.
As it's a typical use case for images and in the core transforms, could you please help add the sample image in the doc? Following: https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/utils_create_transform_ims.py

Thanks.

Comment thread monai/transforms/intensity/array.py
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian

Copy link
Copy Markdown
Member Author

Thanks for the quick update, it overall looks good to me. Put some minor comments inline. As it's a typical use case for 2D image and in the core transforms, could you please help add the sample image in the doc? Following: https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/utils_create_transform_ims.py

Thanks.

@Nic-Ma, I think it has the same blocker that has not been resolved: #4161

@Nic-Ma

Nic-Ma commented May 31, 2022

Copy link
Copy Markdown
Contributor

Thanks for the quick update.
Looks good to me except for the missing sample image in doc.
@rijobro Could you please help guide @drbeh the basic steps to add a sample transform image?

Thanks in advance.

@Nic-Ma

Nic-Ma commented May 31, 2022

Copy link
Copy Markdown
Contributor

Hi @drbeh ,

I feel this transform is different from #4161 as this transform seems like a general-purpose intensity transform for 2D/3D images?
@ericspod @rijobro Please feel free to correct me if I misunderstood it.

Thanks.

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian

Copy link
Copy Markdown
Member Author

HI @Nic-Ma, alright, let me see if I can create an image with the existing data for this transform.

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian

Copy link
Copy Markdown
Member Author

@Nic-Ma, I've added the images for this transform: Project-MONAI/DocImages#12, and updated this PR. Can you check they are fine?

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick update!
Looks good to me.

Thanks.

@Nic-Ma

Nic-Ma commented May 31, 2022

Copy link
Copy Markdown
Contributor

/black

@Nic-Ma

Nic-Ma commented May 31, 2022

Copy link
Copy Markdown
Contributor

/build

@bhashemian bhashemian merged commit 27c37f2 into Project-MONAI:dev May 31, 2022
@bhashemian bhashemian deleted the tissue-mask branch February 22, 2023 15:31
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

Successfully merging this pull request may close these issues.

Tissue Foreground Mask

3 participants