Commit 57b1194c authored by payno's avatar payno Committed by Henri Payno
Browse files

gui / reconstruction parameters: add information regarding the normalization

parent fc298adf
......@@ -83,6 +83,11 @@ class ReconstructionParameters(qt.QWidget):
self._maxLogClipQLE = qt.QLineEdit("", self)
self._maxLogClipQLE.setReadOnly(True)
self.layout().addRow("log max clip", self._maxLogClipQLE)
# sino normalization & normalization file
self._sinonormalizationQLE = qt.QLabel("", self)
self.layout().addRow("sino normalization", self._sinonormalizationQLE)
self._sinonormalizationFileQLE = qt.QLabel("", self)
self.layout().addRow("sino normalization file", self._sinonormalizationFileQLE)
# software version
self._softwareVersionQLE = qt.QLabel("", self)
self.layout().addRow("software version", self._softwareVersionQLE)
......@@ -109,6 +114,7 @@ class ReconstructionParameters(qt.QWidget):
self._setFBPFilter,
self._setMinLogClip,
self._setMaxLogClip,
self._setSinoNormalization,
self._setSoftwareVersion,
):
func(url)
......@@ -309,6 +315,40 @@ class ReconstructionParameters(qt.QWidget):
value = self._decode_nabu_str(get_log_max_clip_value())
self._maxLogClipQLE.setText(str(value) if value is not None else "")
def _setSinoNormalization(self, url):
def get_normalization_method():
_NABU_NORM_URL = (
"../../configuration/processing_options/sino_normalization/method"
)
with HDF5File(url.file_path(), "r") as h5s:
data_path = url.data_path()
log_max_path = os.path.normpath("/".join((data_path, _NABU_NORM_URL)))
if log_max_path in h5s:
return h5py_read_dataset(h5s[log_max_path])
else:
return None
def get_normalization_file():
_NABU_NORM_FILE_URL = (
"../../configuration/nabu_config/preproc/sino_normalization_file"
)
with HDF5File(url.file_path(), "r") as h5s:
data_path = url.data_path()
log_max_path = os.path.normpath(
"/".join((data_path, _NABU_NORM_FILE_URL))
)
if log_max_path in h5s:
return h5py_read_dataset(h5s[log_max_path])
else:
return None
method = get_normalization_method()
normalization_file = get_normalization_file()
self._sinonormalizationQLE.setText(self._decode_nabu_str(method))
self._sinonormalizationFileQLE.setText(
self._decode_nabu_str(normalization_file)
)
def _setSoftwareVersion(self, url):
_NABU_VERSION_URL = "../../version"
......
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