Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
133d3db
API: move 'interp' out of spaces
kohr-h Aug 13, 2019
60acb44
Fix some error checking, docs and whitespace
kohr-h Nov 1, 2019
e2486fb
Handle single-input case in interpolators, add doctest to discr_utils
kohr-h Nov 1, 2019
ed02f84
Fix DiscreteLp.__repr__
kohr-h Nov 2, 2019
bae6d46
Fix discr_utils doctests
kohr-h Nov 12, 2019
d542964
Clarify conditional on variant in nearest edge weight computation
kohr-h Nov 12, 2019
2a4c8c5
Fix typo in discr_ops doctest
kohr-h Nov 12, 2019
b1e1e2c
Remove interp from _resize_discr helper
kohr-h Nov 12, 2019
02bf9e7
Fix wrong kwarg name in linear_deform
kohr-h Nov 12, 2019
a857c68
Adapt deform tests for interp
kohr-h Jan 16, 2020
8706a6a
Adapt discr_mappings (renamed ->discr_utils) tests
kohr-h Jan 16, 2020
2044d79
Remove NN variants
kohr-h Jan 16, 2020
a8c6228
Fix remaining tests wrt interp
kohr-h Jan 18, 2020
a3b5b96
Update copyright year in edited files
kohr-h Jan 18, 2020
90e756e
Fix wrong names used in skimage_radon
kohr-h Jan 18, 2020
bf204d1
Fix unicode issue in discr_utils test
kohr-h Jan 18, 2020
e5cc213
Use larger tolerance in flaky test
kohr-h Jan 18, 2020
022f11d
Run isort on modified files
kohr-h Jan 18, 2020
177d0dd
Take interp into account in deform op repr
kohr-h Jan 18, 2020
921d370
Mention interp in doc of show
kohr-h Jan 18, 2020
fd4dd00
Clarify doc of nearest interpolation regarding neighbor preference
kohr-h Jan 18, 2020
f60fcad
Fix PEP8 issues
kohr-h Jan 18, 2020
192791c
Doc & comment improvement, minor test adaptions
kohr-h Jan 21, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions examples/deform/linearized_fixed_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
"""

import numpy as np
import odl

import odl

# --- Create template and displacement field --- #


# Template space: discretized functions on the rectangle [-1, 1]^2 with
# 100 samples per dimension. Usage of 'linear' interpolation ensures that
# the template gradient is well-defined.
templ_space = odl.uniform_discr([-1, -1], [1, 1], (100, 100), interp='linear')
# 100 samples per dimension.
templ_space = odl.uniform_discr([-1, -1], [1, 1], (100, 100))

# The template is a rectangle of size 1.0 x 0.5
template = odl.phantom.cuboid(templ_space, [-0.5, -0.25], [0.5, 0.25])
Expand Down
8 changes: 4 additions & 4 deletions odl/contrib/datasets/ct/mayo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014-2018 The ODL contributors
# Copyright 2014-2020 The ODL contributors
#
# This file is part of ODL.
#
Expand All @@ -24,6 +24,7 @@
import tqdm

from dicom.datadict import DicomDictionary, NameDict, CleanName
from odl.discr.discr_utils import linear_interpolator
from odl.contrib.datasets.ct.mayo_dicom_dict import new_dict_items

# Update the DICOM dictionary with the extra Mayo tags
Expand Down Expand Up @@ -187,9 +188,8 @@ def load_projections(folder, indices=None):

# Calculate projection data in rectangular coordinates since we have no
# backend that supports cylindrical
proj_data_cylinder = ray_trafo.range.element(data_array)
interpolated_values = proj_data_cylinder.interpolation((theta, u, v))
proj_data = ray_trafo.range.element(interpolated_values)
interpolator = linear_interpolator(data_array, (theta, u, v))
proj_data = ray_trafo.range.element(interpolator)

return geometry, proj_data.asarray()

Expand Down
Loading