Commit f74c53c5 authored by Julia Garriga Ferrer's avatar Julia Garriga Ferrer
Browse files

[app][ows_to_script] Set first filename directory as _dir if it's not given

parent 4fd2295c
Pipeline #52388 passed with stage
in 5 minutes and 2 seconds
......@@ -120,6 +120,7 @@ if __name__ == '__main__':
filenames=filenames,
copy_files=True, in_memory=not options.in_disk)
else:
_dir = _dir if _dir != None else os.path.dirname(options.first_filename)
dataset = Dataset(_dir=_dir,
first_filename=options.first_filename,
copy_files=True, in_memory=not options.in_disk)
......
......@@ -1302,7 +1302,7 @@ class Dataset():
H, W = self.get_data(0).shape
if self.dims.ndim == 1 and kind=="rsm":
if self.dims.ndim == 1 and kind == "rsm":
ffz = self.get_metadata_values(POSITIONER_METADATA, "ffz")[0]
mainx = -self.get_metadata_values(POSITIONER_METADATA, "mainx")[0]
self.transformation = compute_rsm(H, W, d, ffz, mainx)
......
......@@ -120,17 +120,16 @@ class TransformationWidgetOW(OWWidget):
self.controlArea.layout().addWidget(self._widget)
self._widget.setDataset(*self._dataset)
def _sendSignal(self):
"""
Emits the signal with the new dataset.
"""
if hasattr(self._widget, 'magnification'):
self.magnification = self._widget.magnification
self.kind=False
self.kind = False
elif hasattr(self._widget, 'pixelSize'):
self.pixelSize = self._widget.pixelSize
self.rotate = self._widget.rotate
self.kind=True
self.kind = True
self.close()
self.Outputs.dataset.send(self._widget.getDataset())
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