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