Skip to content

Commit 824cdaf

Browse files
authored
Add CT-RATE dataset (#1278)
1 parent 54f7adb commit 824cdaf

6 files changed

Lines changed: 425 additions & 56 deletions

File tree

docs/source/datasets.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ GitHub repository:
1818
<a class="github-button" href="https://github.com/TorchIO-project/torchio/discussions" data-icon="octicon-comment-discussion" aria-label="Discuss TorchIO-project/torchio on GitHub">Discuss</a>
1919
<script async defer src="https://buttons.github.io/buttons.js"></script>
2020

21+
CT-RATE
22+
-------
23+
24+
.. currentmodule:: torchio.datasets.ct_rate
25+
26+
:class:`CtRate`
27+
~~~~~~~~~~~~~~~~
28+
29+
.. autoclass:: CtRate
30+
:members:
2131

2232
IXI
2333
---

pyproject.toml

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ build-backend = "hatchling.build"
66
name = "torchio"
77
version = "0.20.13"
88
description = "Tools for medical image processing with PyTorch"
9-
readme = {file = "README.md", content-type = "text/markdown"}
10-
authors = [
11-
{name = "TorchIO contributors"}
12-
]
13-
maintainers = [
14-
{name = "Fernando Perez-Garcia", email = "fepegar@gmail.com"}
15-
]
9+
readme = { file = "README.md", content-type = "text/markdown" }
10+
authors = [{ name = "TorchIO contributors" }]
11+
maintainers = [{ name = "Fernando Perez-Garcia", email = "fepegar@gmail.com" }]
1612
classifiers = [
1713
"Development Status :: 4 - Beta",
1814
"Environment :: Console",
@@ -32,7 +28,7 @@ classifiers = [
3228
"Topic :: Scientific/Engineering :: Artificial Intelligence",
3329
"Topic :: Scientific/Engineering :: Image Processing",
3430
"Topic :: Scientific/Engineering :: Medical Science Apps.",
35-
"Typing :: Typed"
31+
"Typing :: Typed",
3632
]
3733
keywords = ["medical", "image processing", "pytorch", "augmentation", "mri"]
3834
requires-python = ">=3.9"
@@ -52,12 +48,8 @@ dependencies = [
5248
]
5349

5450
[project.optional-dependencies]
55-
csv = [
56-
"pandas>=1",
57-
]
58-
plot = [
59-
"matplotlib>=3.4",
60-
]
51+
csv = ["pandas>=1"]
52+
plot = ["matplotlib>=3.4"]
6153

6254
[project.scripts]
6355
tiohd = "torchio.cli.print_info:app"
@@ -91,19 +83,13 @@ doc = [
9183
"sphinx-gallery==0.18.0",
9284
"sphinxext-opengraph==0.9.1",
9385
]
94-
maintain = [
95-
"bump-my-version==0.30.1",
96-
]
97-
quality = [
98-
"ruff==0.9.4",
99-
]
86+
maintain = ["bump-my-version==0.30.1"]
87+
quality = ["ruff==0.9.4"]
10088
types = [
101-
"mypy>=1.14.1",
102-
"pandas-stubs>=2.2.2.240807",
89+
"mypy==1.14.1",
90+
"pandas-stubs==2.2.2.240807",
10391
"pillow==11.0.0",
104-
"pip>=25.0.1",
105-
"types-deprecated==1.2.15.20241117",
106-
"types-tqdm>=4.67.0.20250301",
92+
"pip==25.0.1",
10793
]
10894
test = [
10995
"coverage==7.6.10",
@@ -137,6 +123,10 @@ pretty = true
137123
module = "duecredit.*"
138124
ignore_missing_imports = true
139125

126+
[[tool.mypy.overrides]]
127+
module = "huggingface_hub.*"
128+
ignore_missing_imports = true
129+
140130
[[tool.mypy.overrides]]
141131
module = "matplotlib.*"
142132
ignore_missing_imports = true
@@ -151,8 +141,8 @@ ignore_missing_imports = true
151141

152142
[tool.pytest.ini_options]
153143
markers = [
154-
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
155-
"serial",
144+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
145+
"serial",
156146
]
157147
filterwarnings = [
158148
# Ignore SimpleITK Swig warnings
@@ -167,23 +157,11 @@ quote-style = 'single'
167157

168158
[tool.ruff.lint]
169159
preview = true
170-
select = [
171-
"B",
172-
"E",
173-
"F",
174-
"I",
175-
"W",
176-
]
177-
ignore = [
178-
"E203",
179-
"E501",
180-
"N813",
181-
]
160+
select = ["B", "E", "F", "I", "W"]
161+
ignore = ["E203", "E501", "N813"]
182162

183163
[tool.ruff.lint.isort]
184164
force-single-line = true
185165

186166
[tool.coverage.run]
187-
omit = [
188-
"**/_remote_module_non_scriptable.py",
189-
]
167+
omit = ["**/_remote_module_non_scriptable.py"]

src/torchio/datasets/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .bite import BITE3
2+
from .ct_rate import CtRate
23
from .episurg import EPISURG
34
from .fpg import FPG
45
from .itk_snap import T1T2
@@ -24,6 +25,7 @@
2425
'FPG',
2526
'Slicer',
2627
'BITE3',
28+
'CtRate',
2729
'IXI',
2830
'IXITiny',
2931
'RSNAMICCAI',

0 commit comments

Comments
 (0)