[Ctk-developers] Command Line Modules: Constraints and defaults

Mang, Sarah s.mang at Dkfz-Heidelberg.de
Thu Jan 9 12:22:53 UTC 2014


Hi there,

I may have found a related bug. If a parameter value is set by default to 2e-9 it will be set to 0 by CTK (maybe the GUI). So a similar problem may exist for floating point values.

It would be great if you could have a look once you check the QT defaults.

Cheers,
Sarah

-----Ursprüngliche Nachricht-----
Von: ctk-developers-bounces at commontk.org [mailto:ctk-developers-bounces at commontk.org] Im Auftrag von Clarkson, Matt
Gesendet: Mittwoch, 8. Januar 2014 22:54
An: ctk-developers at commontk.org
Betreff: [Ctk-developers] Command Line Modules: Constraints and defaults

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 at 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



_______________________________________________
Ctk-developers mailing list
Ctk-developers at commontk.org
http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers



More information about the Ctk-developers mailing list