Skip to content

Conversation

eclipse0922
Copy link

@eclipse0922 eclipse0922 commented Sep 21, 2025

Fixes #3328 .

Description

A few sentences describing the changes proposed in this pull request.

This pull request introduces GenerateHeatmap and GenerateHeatmapd transforms for creating Gaussian heatmaps from landmark coordinates.
The input points are currently expected in ZYX order, but this can be changed to support XYZ if preferred.
The transforms support both batched (B, N, D) and non-batched (N, D) inputs.

Example notebooks are included for demonstration and will be removed before the PR is merged.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • 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.

Adds a `GenerateHeatmap` transform to create gaussian response maps from landmark coordinates.
This transform is implemented for both array and dictionary-based workflows.
It enables the generation of heatmaps from landmark data, facilitating tasks
like landmark localization and visualization.
The transform supports 2D and 3D coordinates and offers options for controlling
the gaussian standard deviation, spatial shape, truncation, normalization, and data type.
Introduces a new interactive notebook demonstrating landmark to heatmap conversion using MONAI transforms.

This includes:
- A notebook with array and dictionary transform modes.
- A test suite for the `GenerateHeatmap` transform.

This enhancement enables users to visualize and interact with heatmap generation, facilitating a better understanding and application of the MONAI transforms.
Extends the `GenerateHeatmap` transform to support batched inputs,
allowing for more efficient processing of multiple landmark sets.

This change modifies the transform to handle inputs with a batch dimension (B, N, spatial_dims) in addition to single-point inputs (N, spatial_dims).
It also includes a demonstration of 3D heatmap generation using PyVista for visualization.
@eclipse0922 eclipse0922 marked this pull request as draft September 21, 2025 10:42
Streamlines the GenerateHeatmap and GenerateHeatmapd transforms for better usability and code clarity.

Specifically:
- Improves the input landmark array validation to provide a more descriptive error message.
- Removes example notebooks.

DCO Remediation Commit for sewon.jeon <[email protected]>

I, sewon.jeon <[email protected]>, hereby add my Signed-off-by to this commit: 8ef905b
I, sewon.jeon <[email protected]>, hereby add my Signed-off-by to this commit: 226bf90
I, sewon.jeon <[email protected]>, hereby add my Signed-off-by to this commit: 3097baf
I, sewon.jeon <[email protected]>, hereby add my Signed-off-by to this commit: 0072cb0

Signed-off-by: sewon.jeon <[email protected]>
@eclipse0922 eclipse0922 force-pushed the generate_heatmap_transforms branch from 0072cb0 to 25ceb7f Compare September 21, 2025 11:41
Signed-off-by: sewon.jeon <[email protected]>
@eclipse0922 eclipse0922 force-pushed the generate_heatmap_transforms branch from 4443705 to 9e33e7c Compare September 21, 2025 12:29
Copy link
Contributor

coderabbitai bot commented Sep 21, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: sewon.jeon <[email protected]>
Signed-off-by: sewon.jeon <[email protected]>
Signed-off-by: sewon.jeon <[email protected]>
Signed-off-by: sewon.jeon <[email protected]>
@eclipse0922 eclipse0922 marked this pull request as ready for review September 21, 2025 14:27
@eclipse0922 eclipse0922 force-pushed the generate_heatmap_transforms branch from 60b58f5 to 54a81a5 Compare September 21, 2025 14:27
@eclipse0922
Copy link
Author

Signed-off-by: sewon.jeon <[email protected]>
@eclipse0922
Copy link
Author

@coderabbitai review

@eclipse0922
Copy link
Author

@coderabbitai help

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.

Heatmap generation transforms
1 participant