Skip to content
Draft
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ at [OpenAI](https://openai.com/) ([link](https://jack-clark.net/2020/03/17/)).
<a href="https://scrutinizer-ci.com/g/TorchIO-project/torchio/?branch=main">
<img src="https://img.shields.io/scrutinizer/g/TorchIO-project/torchio.svg?label=Code%20quality&logo=scrutinizer" alt="Code quality">
</a>
<a href="https://codeclimate.com/github/TorchIO-project/torchio">
<img src="https://api.codeclimate.com/v1/badges/518673e49a472dd5714d/maintainability" alt="Code maintainability">
</a>
<a href="https://github.com/pre-commit/pre-commit">
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white" alt="pre-commit">
</a>
Expand Down
8 changes: 2 additions & 6 deletions docs/source/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TorchIO

|PyPI-downloads| |PyPI-version| |Conda-version| |Google-Colab-notebook|
|Docs-status| |Tests-status| |Ruff|
|Coverage-codecov| |Code-Quality| |Code-Maintainability| |pre-commit|
|Coverage-codecov| |Code-Quality| |pre-commit|
|YouTube|


Expand All @@ -22,7 +22,7 @@ or `k-space motion artifacts <http://proceedings.mlr.press/v102/shaw19a.html>`_.

TorchIO is part of the official `PyTorch Ecosystem <https://pytorch.org/ecosystem/>`_,
and was featured at
the `PyTorch Ecosystem Day 2021 <https://pytorch.org/ecosystem/pted/2021>`_ and
the `PyTorch Ecosystem Day 2021 <https://pytorch.org/blog/ecosystem_day_2021>`_ and
the `PyTorch Developer Day 2021 <https://pytorch.org/blog/pytorch-developer-day-2021>`_.

Many groups have used TorchIO for their research.
Expand Down Expand Up @@ -109,10 +109,6 @@ If you found a bug or have a feature request, please open an issue:
:target: https://github.com/TorchIO-project/torchio#contributors
:alt: All contributors

.. |Code-Maintainability| image:: https://api.codeclimate.com/v1/badges/518673e49a472dd5714d/maintainability
:target: https://codeclimate.com/github/TorchIO-project/torchio
:alt: Maintainability

.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commit
23 changes: 14 additions & 9 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ Installation
The Python package is hosted on the
`Python Package Index (PyPI) <https://pypi.org/project/torchio/>`_.

To install the latest PyTorch version before installing TorchIO, it is
recommended to use `light-the-torch <https://github.com/pmeier/light-the-torch>`_::

$ pip install light-the-torch && ltt install torch

The latest published version of TorchIO can be installed using Pip Installs
Packages (``pip``)::
Packages (PIP)::

$ pip install torchio

Expand All @@ -25,12 +20,15 @@ If you would like to install Matplotlib to use the plotting features, use::

$ pip install torchio[plot]

You can also install TorchIO with Conda::

$ conda install -c conda-forge torchio

If you are on Windows and have
`trouble installing TorchIO <https://github.com/TorchIO-project/torchio/issues/343>`_,
try `installing PyTorch <https://pytorch.org/get-started/locally/>`_ with
`conda <https://docs.conda.io/en/latest/miniconda.html>`_ before pip-installing
TorchIO.
`conda <https://docs.conda.io/en/latest/miniconda.html>`_
before pip-installing TorchIO.

Hello, World!
-------------
Expand All @@ -50,13 +48,15 @@ in parallel::
t1=tio.ScalarImage('subject_a.nii.gz'),
label=tio.LabelMap('subject_a.nii'),
diagnosis='positive',
age=36,
)

# Image files can be in any format supported by SimpleITK or NiBabel, including DICOM
subject_b = tio.Subject(
t1=tio.ScalarImage('subject_b_dicom_folder'),
label=tio.LabelMap('subject_b_seg.nrrd'),
diagnosis='negative',
age=24,
)

# Images may also be created using PyTorch tensors or NumPy arrays
Expand All @@ -65,9 +65,14 @@ in parallel::
t1=tio.ScalarImage(tensor=tensor_4d),
label=tio.LabelMap(tensor=(tensor_4d > 0.5)),
diagnosis='negative',
age=19,
)

subjects_list = [subject_a, subject_b, subject_c]
subjects_list = [
subject_a,
subject_b,
subject_c,
]

# Let's use one preprocessing transform and one augmentation transform
# This transform will be applied only to scalar images:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class RandomSpike(RandomTransform, IntensityTransform, FourierTransform):
r"""Add random MRI spike artifacts.

Also known as `Herringbone artifact
<https://radiopaedia.org/articles/herringbone-artifact?lang=gb>`_,
<https://radiopaedia.org/articles/herringbone-artifact>`_,
crisscross artifact or corduroy artifact, it creates stripes in different
directions in image space due to spikes in k-space.

Expand Down
Loading