Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christoph Arthofer
fslpy
Commits
33f85a0a
Commit
33f85a0a
authored
Feb 19, 2021
by
Paul McCarthy
🚵
Browse files
Merge branch 'mnt/deprecations' into 'master'
Mnt/deprecations See merge request fsl/fslpy!286
parents
bed22ace
41114fb2
Changes
6
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.rst
View file @
33f85a0a
...
...
@@ -24,6 +24,9 @@ Deprecated
``canHaveGui``, ``inSSHSession``, ``inVNCSession``, ``wxPlatform``,
``wxFlavour``, ``glVersion``, ``glRenderer``, and ``glIsSoftwareRenderer``.
Equivalent functions are being added to the ``fsleyes-widgets`` library.
* The :mod:`fsl.utils.filetree` package has been deprecated, and will be
removed in a future version of ``fslpy`` - it is now published as a separate
library on [PyPI](https://pypi.org/project/file-tree/).
...
...
fsl/data/imagewrapper.py
View file @
33f85a0a
...
...
@@ -733,7 +733,7 @@ def isValidFancySliceObj(sliceobj, shape):
# We only support boolean numpy arrays
# which have the same shape as the image
return
(
isinstance
(
sliceobj
,
np
.
ndarray
)
and
sliceobj
.
dtype
==
np
.
bool
and
sliceobj
.
dtype
==
bool
and
np
.
prod
(
sliceobj
.
shape
)
==
np
.
prod
(
shape
))
...
...
fsl/data/mesh.py
View file @
33f85a0a
...
...
@@ -701,7 +701,7 @@ def calcVertexNormals(vertices, indices, fnormals):
the mesh.
"""
vnormals
=
np
.
zeros
((
vertices
.
shape
[
0
],
3
),
dtype
=
np
.
float
)
vnormals
=
np
.
zeros
((
vertices
.
shape
[
0
],
3
),
dtype
=
float
)
# TODO make fast. I can't figure
# out how to use np.add.at to
...
...
fsl/transform/affine.py
View file @
33f85a0a
...
...
@@ -627,8 +627,8 @@ def rescale(oldShape, newShape, origin=None):
if
origin
is
None
:
origin
=
'centre'
oldShape
=
np
.
array
(
oldShape
,
dtype
=
np
.
float
)
newShape
=
np
.
array
(
newShape
,
dtype
=
np
.
float
)
oldShape
=
np
.
array
(
oldShape
,
dtype
=
float
)
newShape
=
np
.
array
(
newShape
,
dtype
=
float
)
ndim
=
len
(
oldShape
)
if
len
(
oldShape
)
!=
len
(
newShape
):
...
...
fsl/utils/filetree/__init__.py
View file @
33f85a0a
...
...
@@ -289,7 +289,7 @@ of the short variable names defined in the
Running a pipeline on a subset of participants/sessions/runs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Suppose you want to run your pipeline on a subset of your data while testing.
Suppose you want to run your pipeline on a subset of your data while testing.
You may want to do this if your data has a a hierarchy of variables (e.g. participant, session, run) as in the example below.
::
...
...
@@ -321,3 +321,12 @@ __author__ = 'Michiel Cottaar <Michiel.Cottaar@ndcn.ox.ac.uk>'
from
.filetree
import
FileTree
,
register_tree
,
MissingVariable
from
.parse
import
tree_directories
,
list_all_trees
from
.query
import
FileTreeQuery
import
fsl.utils.deprecated
as
deprecated
deprecated
.
warn
(
'fsl.utils.filetree'
,
vin
=
'3.6.0'
,
rin
=
'4.0.0'
,
msg
=
'The filetree package is now released as a separate '
'Python library ("file-tree" on PyPi), and will be '
'removed in a future version of fslpy.'
)
fsl/utils/image/resample.py
View file @
33f85a0a
...
...
@@ -209,7 +209,7 @@ def resample(image,
np
.
all
(
np
.
isclose
(
matrix
,
np
.
eye
(
len
(
newShape
)
+
1
))):
return
data
,
image
.
voxToWorldMat
newShape
=
np
.
array
(
np
.
round
(
newShape
),
dtype
=
np
.
int
)
newShape
=
np
.
array
(
np
.
round
(
newShape
),
dtype
=
int
)
# Apply smoothing if requested,
# and if not using nn interp
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment