Commit bfbeed66 authored by Istvan N Huszar's avatar Istvan N Huszar
Browse files

Fixed git merge error.

parent 8fdf136f
......@@ -1819,28 +1819,20 @@ class TImage(TField):
if self.mask is not None:
mask = mask.reshape(target_domain.shape)
<<<<<<< HEAD
# Bugfix: the voxel shape might change upon evaluation (2D/3D case!)
if self.order == TENSOR_MAJOR:
taxes = tuple(range(self.tdim))
else:
taxes = tuple(range(data.ndim - self.tdim, data.ndim))
=======
>>>>>>> 254f007b0827c68168480bd669bfea8b135a97e7
# Mask points that are outside the voxel grid
# Added on 13 August 2020
if ts.TIMAGE_MASK_MISSING_DATA:
if mask is None:
mask = np.ones(target_domain.shape, dtype=np.float32)
<<<<<<< HEAD
if taxes:
indices = np.flatnonzero(np.all(data == np.inf, axis=taxes))
=======
if self.taxes:
indices = np.flatnonzero(np.all(
data == np.inf, axis=self.taxes))
>>>>>>> 254f007b0827c68168480bd669bfea8b135a97e7
else:
indices = np.flatnonzero(data == np.inf)
data[data == np.inf] = ts.FILL_VALUE
......@@ -1858,14 +1850,6 @@ class TImage(TField):
# Create new TImage
new_name = "%s.%s" % (self.name, target_domain.name)
<<<<<<< HEAD
=======
# Bugfix: the voxel shape might change upon evaluation (2D/3D case!)
if self.order == TENSOR_MAJOR:
taxes = tuple(range(self.tdim))
else:
taxes = tuple(range(data.ndim - self.tdim, data.ndim))
>>>>>>> 254f007b0827c68168480bd669bfea8b135a97e7
# ipc = self.interpolator.__class__
# ip = self.interpolator
# interpolator = ipc(data, ip.threads, ip.verbose, **ip.kwargs)
......
......@@ -138,28 +138,16 @@ class TIRLObject(object, metaclass=InstanceCounterMeta):
if isinstance(node, dict):
iterator = ((key, node[key]) for key in sorted(node.keys()))
for key, item in iterator:
<<<<<<< HEAD
=======
# for key, item in node.items():
>>>>>>> 254f007b0827c68168480bd669bfea8b135a97e7
res = TIRLObject.hload(item, objects)
if isinstance(res, TIRLObject):
node[key] = res
if ("type" in node.keys()) and ("id" in node.keys()):
<<<<<<< HEAD
obj = getattr(locate(node["type"]), "_load")(node)
if node["id"] not in objects.keys():
objects.update({node["id"]: obj})
return objects[node["id"]]
else:
return obj
=======
if node["id"] not in objects.keys():
# obj = locate(node["type"])._load(node)
obj = getattr(locate(node["type"]), "_load")(node)
objects.update({node["id"]: obj})
return objects[node["id"]]
>>>>>>> 254f007b0827c68168480bd669bfea8b135a97e7
elif isinstance(node, list):
for key, item in enumerate(node):
res = TIRLObject.hload(item, objects)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment