Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
4e63aac4
Commit
4e63aac4
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
MNT: Use %-formatting in log calls
parent
bad9585c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/image.py
+12
-13
12 additions, 13 deletions
fsl/data/image.py
with
12 additions
and
13 deletions
fsl/data/image.py
+
12
−
13
View file @
4e63aac4
...
...
@@ -469,10 +469,10 @@ class Nifti(notifier.Notifier, meta.Meta):
self
.
__worldToVoxMat
=
transform
.
invert
(
self
.
__voxToWorldMat
)
log
.
debug
(
'
Affine changed:
\n
pixdims:
'
'
{}
\n
sform:
{}
\n
qform:
{}
'
.
format
(
header
.
get_zooms
(),
header
.
get_sform
(),
header
.
get_qform
())
)
'
%s
\n
sform:
%s
\n
qform:
%s
'
,
header
.
get_zooms
(),
header
.
get_sform
(),
header
.
get_qform
())
self
.
notify
(
topic
=
'
transform
'
)
...
...
@@ -1080,13 +1080,13 @@ class Image(Nifti):
# If an image size threshold has not been specified,
# then we'll calculate the full data range right now.
if
sizethres
is
None
or
nbytes
<
sizethres
:
log
.
debug
(
'
{}
: Forcing calculation of full
'
'
data range
'
.
format
(
self
.
name
)
)
log
.
debug
(
'
%s
: Forcing calculation of full
'
'
data range
'
,
self
.
name
)
self
.
__imageWrapper
[:]
else
:
log
.
debug
(
'
{}
: Calculating data range
'
'
from sample
'
.
format
(
self
.
name
)
)
log
.
debug
(
'
%s
: Calculating data range
'
'
from sample
'
,
self
.
name
)
# Otherwise if the number of values in the
# image is bigger than the size threshold,
...
...
@@ -1118,7 +1118,7 @@ class Image(Nifti):
if
not
looksLikeImage
(
filename
):
filename
=
addExt
(
filename
,
mustExist
=
False
)
log
.
debug
(
'
Saving
{}
to
{}
'
.
format
(
self
.
name
,
filename
)
)
log
.
debug
(
'
Saving
%s
to
%s
'
,
self
.
name
,
filename
)
# We save the image out to a temp file,
# then close the old image, move the
...
...
@@ -1262,7 +1262,7 @@ class Image(Nifti):
:arg sliceobj: Something which can slice the image data.
"""
log
.
debug
(
'
{}
: __getitem__ [
{}]
'
.
format
(
self
.
name
,
sliceobj
)
)
log
.
debug
(
'
%s
: __getitem__ [
%s]
'
,
self
.
name
,
sliceobj
)
return
self
.
__imageWrapper
.
__getitem__
(
sliceobj
)
...
...
@@ -1278,9 +1278,8 @@ class Image(Nifti):
"""
values
=
np
.
array
(
values
)
log
.
debug
(
'
{}: __setitem__ [{} = {}]
'
.
format
(
self
.
name
,
sliceobj
,
values
.
shape
))
log
.
debug
(
'
%s: __setitem__ [%s = %s]
'
,
self
.
name
,
sliceobj
,
values
.
shape
)
with
self
.
__imageWrapper
.
skip
(
self
.
__lName
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment