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

Prepare for 0.2.0 #162

Merged
merged 15 commits into from
Jan 8, 2024
3 changes: 1 addition & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9"]
poetry-version: [1.3.2]
poetry-version: [1.7.1]
# os: [ubuntu-20.04, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
Expand Down
12 changes: 6 additions & 6 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ authors:
family-names: Chlap
email: [email protected]
affiliation: University of New South Wales
orcid: 'https://orcid.org/0000-0002-6517-8745'
orcid: "https://orcid.org/0000-0002-6517-8745"
- given-names: Daniel
family-names: Al Mouiee
affiliation: Ingham Institute
- given-names: Robert N.
family-names: Finnegan
affiliation: University of Sydney
orcid: 'https://orcid.org/0000-0003-4728-8462'
orcid: "https://orcid.org/0000-0003-4728-8462"
- given-names: Xinyi
family-names: Cui
affiliation: University of New South Wales
Expand All @@ -34,12 +34,12 @@ authors:
- given-names: Lois
family-names: Holloway
affiliation: University of New South Wales
repository-code: 'https://github.com/AustralianCancerDataNetwork/pydicer'
url: 'https://australiancancerdatanetwork.github.io/pydicer/'
repository-code: "https://github.com/AustralianCancerDataNetwork/pydicer"
url: "https://australiancancerdatanetwork.github.io/pydicer/"
keywords:
- medical imaging
- DICOM
- radiotherapy
license: Apache-2.0
version: 0.1.0
date-released: '2023-06-04'
version: 0.2.0
date-released: "2023-12-20"
56 changes: 31 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# PyDicer: PYthon Dicom Image ConvertER

Welcome to pydicer, a tool to ease the process of converting DICOM data objects into a format typically used for research purposes. In addition to data conversion, functionality is provided to help analyse the data such as the computing radiomic features or radiotherapy dose metrics. PyDicer uses the NIfTI format to store data is a well defined file system structure. Tracking of these data objects in CSV files, also stored on the file system, provides an easy and flexible way to work with the converted data in your research.
Welcome to PyDicer, a tool to ease the process of converting Radiotherapy DICOM data objects into a format typically used for research purposes. In addition to data conversion, functionality is provided to help analyse the data. This includes computing radiomic features, radiotherapy dose metrics and auto-segmentation metrics. PyDicer uses the NIfTI format to store data is a well defined file system structure. Tracking of these data objects in CSV files, also stored on the file system, provides an easy and flexible way to work with the converted data in your research.

The [PyDicer documentation](https://australiancancerdatanetwork.github.io/pydicer/index.html) provides several examples and guides to help you get started with the tool. Here are a few **PyDicer principles** to keep in mind as you get started:

- The [working directory structure](https://australiancancerdatanetwork.github.io/pydicer/index.html#directory-structure) is standardised and generalisable for use with any DICOM dataset.
- Use [Pandas DataFrame's](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) to work with converted data objects.
- [SimpleITK](https://simpleitk.readthedocs.io/en/master/) and [PlatiPy](https://pyplati.github.io/platipy/) are used under the hood for the image conversion, visualisation and analysis tasks.
- Always inspect visualisations, plots and metrics produced by PyDicer in your working directory. Remember, PyDicer is a research tool so only use it for research purposes and expect the unexpected!

## Installation

Expand All @@ -11,9 +18,20 @@ environment using `pip`:
pip install pydicer
```

## Supported Modalities

PyDicer currently supports converting and analysing the following DICOM modalities:

- CT
- MR
- PT (Experimental)
- RTSTRUCT
- RTPLAN (Not converted since this only consists of meta data)
- RTDOSE

## Directory Structure

pydicer will place converted and intermediate files into a specific directory structure. Within the configured working directory `[working]`, the following directories will be generated:
PyDicer will place converted and intermediate files into a specific directory structure. Visualisation, metrics computed and plots are also stored along side the converted data objects. Within the configured working directory `[working]`, the following directories will be generated:

- `[working]/data`: Directory in which converted data will be placed
- `[working]/quarantine`: Files which couldn't be preprocessed or converted will be placed in here for you to investigate further
Expand Down Expand Up @@ -66,31 +84,19 @@ pydicer.run_pipeline()

## Contributing

PyDicer is a research tool and adding to its functionality is encouraged. All GitHub Pull Requests
are welcome. We do ask that you abide by our code of conduct and follow our coding standards.

### Coding standards

Code in pydicer must conform to Python's PEP-8 standards to ensure consistent formatting between contributors. To ensure this, pylint is used to check code conforms to these standards before a Pull Request can be merged. You can run pylint from the command line using the following command:
PyDicer is an open-source tool and contributions are welcome! Here are some ways you might consider contributing to the project:

```bash
pylint pydicer
```

But a better idea is to ensure you are using a Python IDE which supports linting (such as [VSCode](https://code.visualstudio.com/docs/python/linting) or PyCharm). Make sure you resolve all suggestions from pylint before submitting your pull request.

If you're new to using pylint, you may like to [read this guide](https://docs.pylint.org/en/v2.11.1/tutorial.html).
- Reporting issues on GitHub.
- Correcting/extending the documentation.
- Contributing a bug fix or extending some functionality.
- Providing functionality to support additional DICOM modalities.
- Giving the [PyDicer project](https://github.com/AustralianCancerDataNetwork/pydicer) a star on GitHub.

### Automated tests
For more information, see the [Contributing documentation](https://australiancancerdatanetwork.github.io/pydicer/contributing.html).

A test suite is included in pydicer which ensures that code contributed to the repository functions as expected and continues to function as further development takes place. Any code submitted via a pull request should include appropriate automated tests for the new code.
## Authors

pytest is used as a testing library. Running the tests from the command line is really easy:

```bash
pytest
```
PyDicer was developed by the [Ingham Medical Physics team](https://www.unsw.edu.au/medicine-health/our-schools/clinical-medicine/research-impact/research-groups/cancer/ingham-medical-physics) in South-Western Sydney. It was developed as part of the [Australian Cancer Data Network](https://australian-cancer-data.network/) supported by the [Australian Research Data Commons](https://ardc.edu.au/).

Add your tests to the appropriate file in the `tests/` directory. See the [pytest documention](https://docs.pytest.org/en/6.2.x/getting-started.html) for more information.
or check out the [Getting Started Example](https://australiancancerdatanetwork.github.io/pydicer/_examples/GettingStarted.html).
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/australiancancerdatanetwork/pydicer/blob/main/examples/GettingStarted.ipynb)
- **Phillip Chlap** - [[email protected]]([email protected])
- **Daniel Al Mouiee** - [[email protected]]([email protected])
8 changes: 4 additions & 4 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
table.dataframe {
table {
color: var(--color-foreground-primary) !important;
}

table.dataframe thead {
table thead {
background-color: var(--color-card-marginals-background) !important;
}

table.dataframe tr:nth-child(odd) {
table tr:nth-child(odd) {
background: var(--color-background-border) !important;
}

table.dataframe tr:nth-child(even) {
table tr:nth-child(even) {
background: var(--color-card-marginals-background) !important;
}

Expand Down
3 changes: 3 additions & 0 deletions docs/analyse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ Analyse

.. automodule:: pydicer.analyse.data
:members:

.. automodule:: pydicer.analyse.compare
:members:
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
copyright = f"{year}, Ingham Medical Physics"
author = "Ingham Medical Physics"

# The full version, including alpha/beta/rc tags
release = "0.1.0"


# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -85,9 +82,13 @@ def setup(app):
shutil.copy("../examples/VisualiseData.ipynb", "_examples/VisualiseData.ipynb")
shutil.copy("../examples/DoseMetrics.ipynb", "_examples/DoseMetrics.ipynb")
shutil.copy("../examples/Radiomics.ipynb", "_examples/Radiomics.ipynb")
shutil.copy("../examples/DatasetPreparation.ipynb", "_examples/DatasetPreparation.ipynb")
shutil.copy(
"../examples/DatasetPreparation.ipynb", "_examples/DatasetPreparation.ipynb"
)
shutil.copy("../examples/WorkingWithData.ipynb", "_examples/WorkingWithData.ipynb")
shutil.copy("../examples/WorkingWithStructures.ipynb", "_examples/WorkingWithStructures.ipynb")
shutil.copy(
"../examples/WorkingWithStructures.ipynb", "_examples/WorkingWithStructures.ipynb"
)
shutil.copy("../examples/Configuration.ipynb", "_examples/Configuration.ipynb")
shutil.copy("../examples/ObjectGeneration.ipynb", "_examples/ObjectGeneration.ipynb")
shutil.copy("../examples/AutoSegmentation.ipynb", "_examples/AutoSegmentation.ipynb")
Expand Down
Loading
Loading