Skip to content

Commit 4a61cd9

Browse files
authored
Merge pull request #16 from nipy/bump-scikit-learn
dependency upgrade - scikit learn secured
2 parents add4447 + b56ab68 commit 4a61cd9

File tree

5 files changed

+221
-253
lines changed

5 files changed

+221
-253
lines changed

CONTRIBUTE.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,42 @@
33
Thank you your help!
44

55
NiLabels (ex LABelsToolkit) started as a python package containing a range of heterogeneous imaging tools to perform
6-
quick manipulations and measurement on segmentations from ipython or jupyter notebook.
7-
Initially planned to support several projects undertook by the initial author, after some development and refactoring
6+
quick manipulations and measurement on segmentations from ipython or jupyter notebook.
7+
Initially planned to support several projects undertook by the initial author, after some development and refactoring
88
it is now intended to be part of the Nipy ecosystem, to provide the neuroimaging developer community with another tool.
99

1010
## Code of Conduct
1111

12-
This project adopts the [Covenant Code of Conduct](https://contributor-covenant.org/).
13-
By participating, you are expected to uphold this code.
14-
15-
## Before starting
12+
This project adopts the [Covenant Code of Conduct](https://contributor-covenant.org/).
13+
By participating, you are expected to uphold this code.
14+
15+
## Before starting
1616

1717
Please familiarise with the design pattern and the nomenclature employed.
18-
+ **tools:** core methods are all there, divivded by final intended aim. A tool acts on the numpy arrays or on
19-
instances of nibabel images.
20-
+ **agents** are facades collecting all the tools, and make them act directly on the paths to the nifti images.
21-
+ **main:** is facade of the facades under agents folder package. This collects all the methods under
18+
19+
+ **tools:** core methods are all there, divivded by final intended aim. A tool acts on the numpy arrays or on
20+
instances of nibabel images.
21+
+ **agents** are facades collecting all the tools, and make them act directly on the paths to the nifti images.
22+
+ **main:** is facade of the facades under agents folder package. This collects all the methods under
2223
the agents facades, therefore accessing to all the tools.
23-
24+
2425
Typical usage in an ipython session involves importing the main facade, and then some tab completition to browse
2526
the provided methods.
26-
27-
## Contributions: Questions, bugs, issues and new features
2827

29-
+ For any issue bugs or question related to the code, please raise an issue in the
28+
## Contributions: Questions, bugs, issues and new features
29+
30+
+ For any issue bugs or question related to the code, please raise an issue in the
3031
[nilabels issue page](https://github.com/SebastianoF/nilabels/issues).
3132

3233
+ Propose here as well improvements suggestions and new features.
3334

34-
+ **Please use a new issue for each thread:** make your issue re-usable and reachable by other users that may have
35+
+ **Please use a new issue for each thread:** make your issue re-usable and reachable by other users that may have
3536
encountered a similar problem.
3637

37-
+ If you forked the repository and made some contributions that you would like to integrate in the git master branch,
38-
you can do a [git pull request](https://yangsu.github.io/pull-request-tutorial/). Please **check tests are all passed**
38+
+ If you forked the repository and made some contributions that you would like to integrate in the git master branch,
39+
you can do a [git pull request](https://yangsu.github.io/pull-request-tutorial/). Please **check tests are all passed**
3940
before this.
4041

41-
4242
## To update the coverage badge
4343

4444
+ `pip install coverage-badge`

README.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ segmentations in nifti format. It is strongly based on and influenced by the lib
2020
+ [Design pattern](https://github.com/SebastianoF/nilabels/wiki/Design-Pattern)
2121
+ [Work in progress](https://github.com/SebastianoF/nilabels/wiki/Work-in-Progress)
2222

23-
### Introductory examples
23+
## Introductory examples
2424

25-
#### 1 Manipulate labels: relabel
25+
### 1 Manipulate labels: relabel
2626

2727
Given a segmentation, imagine you want to change the labels values from [1, 2, 3, 4, 5, 6] to [2, 12, 4, 7, 5, 6]
2828
and save the result in `my_new_segm.nii.gz`. Then:
@@ -36,7 +36,7 @@ nil_app.manipulate_labels.relabel('my_segm.nii.gz', 'my_new_segm.nii.gz', [1, 2
3636

3737
```
3838

39-
#### 2 Manipulate labels: clean a segmentation
39+
### 2 Manipulate labels: clean a segmentation
4040

4141
Given a parcellation for which we expect a single connected component per label, we want to have it cleaned from all the
4242
extra components, merging them with the closest labels.
@@ -56,9 +56,9 @@ nil_app.check.number_connected_components_per_label('cleaned_segm.nii.gz', where
5656
<img src="https://github.com/SebastianoF/nilabels/blob/master/examples/cleaning_before_after.png" width="600">
5757
</p>
5858

59-
6059
Before cleaning `check.number_connected_components_per_label` would return:
61-
```
60+
61+
```text
6262
6363
Label 0 has 1 connected components
6464
Label 1 has 13761 connected components
@@ -73,7 +73,8 @@ Label 9 has 746 connected components
7373
```
7474

7575
The same command after cleaning:
76-
```
76+
77+
```text
7778
Label 0 has 1 connected components
7879
Label 1 has 1 connected components
7980
Label 2 has 1 connected components
@@ -88,32 +89,30 @@ Label 9 has 1 connected components
8889

8990
More tools are introduced in the [documentation](https://github.com/SebastianoF/nilabels/wiki/What-you-can-do-with-nilabels).
9091

91-
### Instructions
92+
## Instructions
9293

9394
+ [Documentation](https://github.com/SebastianoF/nilabels/wiki)
9495
+ [How to install](https://github.com/SebastianoF/nilabels/wiki/Instructions)
9596
+ [How to run the tests](https://github.com/SebastianoF/nilabels/wiki/Testing)
9697

97-
98-
### Development
98+
## Development
9999

100100
`nilabel` is a python package managed with [poetry](https://python-poetry.org/) and linted with [ruff](https://docs.astral.sh/ruff/), tested with [pytest](https://docs.pytest.org/en/8.0.x/)
101101

102-
### TODO
102+
## TODO
103103

104104
Other than the many TODOs around the code, there are two more things:
105105

106-
- typechecking with mypy
107-
- migrate from cicleCI to github workflows
106+
+ typechecking with mypy
107+
+ migrate from cicleCI to github workflows
108108

109-
### Licencing and Copyright
109+
## Licencing and Copyright
110110

111111
Copyright (c) 2017, Sebastiano Ferraris. NiLabels (ex. [LABelsToolkit](https://github.com/SebastianoF/LABelsToolkit))
112112
is provided as it is and it is available as free open-source software under
113113
[MIT License](https://github.com/SebastianoF/nilabels/blob/master/LICENCE.txt)
114114

115-
116-
### Acknowledgements
115+
## Acknowledgements
117116

118117
+ This repository had begun within the [GIFT-surg research project](http://www.gift-surg.ac.uk).
119118
+ This work was supported by Wellcome / Engineering and Physical Sciences Research Council (EPSRC) [WT101957; NS/A000027/1; 203145Z/16/Z].

0 commit comments

Comments
 (0)