Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit b7e7ebe

Browse files
committed
Merge branch 'dev' into 'master'
Merge dev to master before tagging v0.2.0 See merge request !64
2 parents 520e5ec + cb0fa89 commit b7e7ebe

File tree

7 files changed

+36
-4
lines changed

7 files changed

+36
-4
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ pylintjob:
88
stage: pylint_test
99
except:
1010
- 139-correct-toynet-demo-instructions
11+
- 148-publish-niftynet-v0-2-0-on-python-package-index-pypi
1112
script:
12-
- pylint --rcfile=pylintrc niftynet/engine
13+
- pylint --rcfile=tests/pylintrc niftynet/engine
1314

1415
testjob:
1516
stage: dev_test
@@ -154,6 +155,7 @@ quicktest:
154155
- 147-revise-contribution-guidelines-to-include-github
155156
- 150-properly-format-the-bibtex-entry-to-the-ipmi-2017-paper-on-the-main-readme
156157
- 139-correct-toynet-demo-instructions
158+
- 148-publish-niftynet-v0-2-0-on-python-package-index-pypi
157159
script:
158160
# print system info
159161
- which nvidia-smi

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,25 @@ The API reference is available on [Read the Docs][rtd-niftynet].
6666

6767
[rtd-niftynet]: http://niftynet.rtfd.io/
6868

69+
#### Contributing
6970

70-
### Contributing
71+
Please see the [contribution guidelines](./CONTRIBUTING.md).
7172

72-
Feature requests and bug reports are collected on [Issues](https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet/issues).
73+
#### Useful links
74+
75+
[NiftyNet website][niftynet-io]
76+
77+
[NiftyNet source code on CmicLab][niftynet-cmiclab]
78+
79+
[NiftyNet source code mirror on GitHub][niftynet-github]
80+
81+
NiftyNet mailing list: [[email protected]][ml-niftynet]
82+
83+
[niftynet-io]: http://niftynet.io/
84+
[niftynet-cmiclab]: https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet
85+
[niftynet-github]: https://github.com/NifTK/NiftyNet
86+
[ml-niftynet]: mailto:[email protected]
7387

74-
Contributors are encouraged to take a look at [CONTRIBUTING.md](./CONTRIBUTING.md).
7588

7689
### Citing NiftyNet
7790

doc/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Useful links
5353

5454
`NiftyNet source code mirror on GitHub`_
5555

56+
NiftyNet mailing list: [email protected]
57+
5658

5759
.. _`NiftyNet website`: http://niftynet.io/
5860
.. _`NiftyNet source code on CmicLab`: https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet

niftynet/engine/sampler_resize.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def __init__(self,
2525
reader,
2626
data_param,
2727
batch_size,
28+
spatial_window_size=(),
2829
windows_per_image=1,
2930
shuffle_buffer=True,
3031
queue_length=10):
@@ -44,6 +45,12 @@ def __init__(self,
4445
self.reader.shapes,
4546
self.reader.tf_dtypes,
4647
data_param)
48+
if spatial_window_size:
49+
# override all spatial window defined in input
50+
# modalities sections
51+
# this is useful when do inference with a spatial window
52+
# which is different from the training specifications
53+
self.window.set_spatial_shape(spatial_window_size)
4754
tf.logging.info('initialised window instance')
4855
self._create_queue_and_ops(self.window,
4956
enqueue_size=1,

niftynet/engine/windows_aggregator_resize.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ def _save_current_image(self, image_out, resize_to):
6969
window_shape = resize_to
7070
while image_out.ndim < 5:
7171
image_out = image_out[..., np.newaxis, :]
72+
if self.window_border and any([b > 0 for b in self.window_border]):
73+
np_border = self.window_border
74+
while len(np_border) < 5:
75+
np_border = np_border + (0,)
76+
np_border = [(b,) for b in np_border]
77+
image_out = np.pad(image_out, np_border, mode='edge')
7278
image_shape = image_out.shape
7379
zoom_ratio = \
7480
[float(p) / float(d) for p, d in zip(window_shape, image_shape)]

pip/long_description.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ Useful links
7878

7979
`NiftyNet source code mirror on GitHub`_
8080

81+
NiftyNet mailing list: [email protected]
82+
8183

8284
.. _`NiftyNet website`: http://niftynet.io/
8385
.. _`NiftyNet source code on CmicLab`: https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet
File renamed without changes.

0 commit comments

Comments
 (0)