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

docs: Add Quick Start Example to README #8273

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,19 @@ If you have used MONAI in your research, please cite us! The citation can be exp
[The MONAI Model Zoo](https://github.com/Project-MONAI/model-zoo) is a place for researchers and data scientists to share the latest and great models from the community.
Utilizing [the MONAI Bundle format](https://docs.monai.io/en/latest/bundle_intro.html) makes it easy to [get started](https://github.com/Project-MONAI/tutorials/tree/main/model_zoo) building workflows with MONAI.

## Quick Start Example
Here's a simple example of using MONAI for medical image preprocessing:

```python
import monai
from monai.transforms import LoadImage, Spacing

# Load a medical image
image = LoadImage()(image_path)
# Resample the image to a specific spacing
spaced_image = Spacing(pixdim=(1.5, 1.5, 2.0))(image)
Comment on lines +65 to +72
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```python
import monai
from monai.transforms import LoadImage, Spacing
# Load a medical image
image = LoadImage()(image_path)
# Resample the image to a specific spacing
spaced_image = Spacing(pixdim=(1.5, 1.5, 2.0))(image)
```python
from monai.transforms import (
Compose,
LoadImage,
ScaleIntensity,
AddChannel
)
# Define transforms for image preprocessing
transforms = Compose([
LoadImage(image_only=True),
AddChannel(),
ScaleIntensity()
])
# Apply transforms to your image
image = transforms(image_path)

We're updating the website shortly and will be using the example I've suggested here, is that suitable to you for this update? Thanks for the contribution!

Copy link
Author

Choose a reason for hiding this comment

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

So good! Thanks a lot for you!

Copy link
Member

Choose a reason for hiding this comment

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

If you're ok with this you can commit the suggestion yourself through the Github interface then we can approve, otherwise if you wanted to modify what I'd suggest we can review again.

```

## Contributing
For guidance on making a contribution to MONAI, see the [contributing guidelines](https://github.com/Project-MONAI/MONAI/blob/dev/CONTRIBUTING.md).

Expand Down
Loading