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

Commit

Permalink
Merge branch 'dev' into 'master'
Browse files Browse the repository at this point in the history
Merge dev to master before tagging v0.2.0

See merge request !64
  • Loading branch information
wyli committed Sep 8, 2017
2 parents 520e5ec + cb0fa89 commit b7e7ebe
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ pylintjob:
stage: pylint_test
except:
- 139-correct-toynet-demo-instructions
- 148-publish-niftynet-v0-2-0-on-python-package-index-pypi
script:
- pylint --rcfile=pylintrc niftynet/engine
- pylint --rcfile=tests/pylintrc niftynet/engine

testjob:
stage: dev_test
Expand Down Expand Up @@ -154,6 +155,7 @@ quicktest:
- 147-revise-contribution-guidelines-to-include-github
- 150-properly-format-the-bibtex-entry-to-the-ipmi-2017-paper-on-the-main-readme
- 139-correct-toynet-demo-instructions
- 148-publish-niftynet-v0-2-0-on-python-package-index-pypi
script:
# print system info
- which nvidia-smi
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,25 @@ The API reference is available on [Read the Docs][rtd-niftynet].

[rtd-niftynet]: http:https://niftynet.rtfd.io/

#### Contributing

### Contributing
Please see the [contribution guidelines](./CONTRIBUTING.md).

Feature requests and bug reports are collected on [Issues](https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet/issues).
#### Useful links

[NiftyNet website][niftynet-io]

[NiftyNet source code on CmicLab][niftynet-cmiclab]

[NiftyNet source code mirror on GitHub][niftynet-github]

NiftyNet mailing list: [[email protected]][ml-niftynet]

[niftynet-io]: http:https://niftynet.io/
[niftynet-cmiclab]: https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet
[niftynet-github]: https://github.com/NifTK/NiftyNet
[ml-niftynet]: mailto:[email protected]

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

### Citing NiftyNet

Expand Down
2 changes: 2 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Useful links

`NiftyNet source code mirror on GitHub`_

NiftyNet mailing list: [email protected]


.. _`NiftyNet website`: http:https://niftynet.io/
.. _`NiftyNet source code on CmicLab`: https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet
Expand Down
7 changes: 7 additions & 0 deletions niftynet/engine/sampler_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self,
reader,
data_param,
batch_size,
spatial_window_size=(),
windows_per_image=1,
shuffle_buffer=True,
queue_length=10):
Expand All @@ -44,6 +45,12 @@ def __init__(self,
self.reader.shapes,
self.reader.tf_dtypes,
data_param)
if spatial_window_size:
# override all spatial window defined in input
# modalities sections
# this is useful when do inference with a spatial window
# which is different from the training specifications
self.window.set_spatial_shape(spatial_window_size)
tf.logging.info('initialised window instance')
self._create_queue_and_ops(self.window,
enqueue_size=1,
Expand Down
6 changes: 6 additions & 0 deletions niftynet/engine/windows_aggregator_resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ def _save_current_image(self, image_out, resize_to):
window_shape = resize_to
while image_out.ndim < 5:
image_out = image_out[..., np.newaxis, :]
if self.window_border and any([b > 0 for b in self.window_border]):
np_border = self.window_border
while len(np_border) < 5:
np_border = np_border + (0,)
np_border = [(b,) for b in np_border]
image_out = np.pad(image_out, np_border, mode='edge')
image_shape = image_out.shape
zoom_ratio = \
[float(p) / float(d) for p, d in zip(window_shape, image_shape)]
Expand Down
2 changes: 2 additions & 0 deletions pip/long_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ Useful links

`NiftyNet source code mirror on GitHub`_

NiftyNet mailing list: [email protected]


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

0 comments on commit b7e7ebe

Please sign in to comment.