Skip to content

Can't adjust thresholds on float images #329

@btbest

Description

@btbest

Reproduce by adding float probabilities to e.g. oc-from-probabilities and then trying to adjust display threshold on the viewer's probabilities layer. Probably another case of the newer qt version being strict on integers in more widgets.

Affected version: In 1.4.1post1, the thresholding simply doesn't work (it display ranges from 0 to 0). In the current dev environment, ilastik crashes with an error when trying to open the thresholding dialog:

Traceback (most recent call last):
  File "\volumina\volumina\widgets\layercontextmenu.py", line 53, in adjust_thresholds_callback
    dlg = GrayscaleLayerDialog(layer, menu.parent())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "\volumina\volumina\widgets\layerDialog.py", line 79, in __init__
    self.initialize_range_widgets(
  File "\volumina\volumina\widgets\layerDialog.py", line 56, in initialize_range_widgets
    thresholding_widget.setRange(normalization_range[0], normalization_range[1])
  File "\volumina\volumina\widgets\thresholdingWidget.py", line 69, in setRange
    self._minSlider.setRange(minimum, maximum)
TypeError: setRange(self, min: int, max: int): argument 1 has unexpected type 'numpy.float32'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions