Page MenuHomePhabricator

Command line module GUI supports only values of a certain accuracy
Closed, WontfixPublic

Description

If a parameter value is set by default to 2e-9 the GUI will set it to 0 because it cannot represent values this small.

Event Timeline

A similar problem seems to exist for integers.
See mailing list post:

Hi there,

John reported the error below to me.

Looks to me like the .xsl file in CTK could be at fault.

  1. The integer spin box has a Qt default of [0,99].
  2. The .xsl file applies a default of -999999999 to 999999999 but only if the constraints element does not exist. So, if it does exist, this bit is missed.
  3. Then the default of 300 is clamped to 99.
  4. Then the specific constraint of 1-9999 is applied

So, either steps 3 or 4 need the ordering reversed, or step 2 needs to apply this range regardless of whether the constrains element is present.

Can anyone advise? My XSD/XSLT/XML knowledge is limited.
Thanks

Matt


From: John Hipwell <j.hipwell@ucl.ac.uk>
Sent: 08 January 2014 18:04

It looks to me as though the CLI module parsing clips default values at
2 digits. For instance the following:

<integer>
  <name>iterations</name>
  <longflag>mi</longflag>
  <description>Maximum number of iterations per level.</description>
  <label>Maximum number of iterations per level</label>
  <default>300</default>
  <constraints>
    <minimum>1</minimum>
    <maximum>9999</maximum>
    <step>1</step>
  </constraints>
</integer>

results in a default value of '99' appearing in the corresponding text box of the GUI. Has anyone noticed this?

Removing the constraints results in the correct value of '300' being displayed.

Curious....
John

kislinsk triaged this task as Low priority.Aug 10 2016, 6:20 AM
kislinsk closed this task as Wontfix.May 26 2020, 11:17 AM
kislinsk claimed this task.
kislinsk added a project: Auto-closed.
kislinsk added a subscriber: kislinsk.

Hi there! 🙂

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. 🚑

Best wishes,
The MITK devs

kislinsk removed kislinsk as the assignee of this task.May 26 2020, 12:05 PM
kislinsk removed a subscriber: kislinsk.