DCBIA-OrthoLab / ShapeVariationAnalyzer

Shape modeling and classification, extract shape features
Apache License 2.0
8 stars 22 forks source link

ENH: Simplify setup of ShapeVariationAnalyzerWidget #62

Open jcfr opened 2 years ago

jcfr commented 2 years ago

This commit removes the explicit setting of ivars and instead uses the function slicer.util.childWidgetVariables.

The updates was done following these steps:

  1. Systematic replace of self.<widgetName> with self.ui.<widgetName>

    script=ShapeVariationAnalyzer/ShapeVariationAnalyzer.py
    for widget in $(cat $script | ack "getUI\('" | cut -d"'" -f2); do
    sed "s/self\.$widget/self.ui.$widget/" $script -i;
    done
  2. Manual removal of lines including self.getUI and removal of implementation of getUI function.

  3. Additional replacements in script:

    self.spinBox_colorModeParam1
    -> self.ui.spinBox_colorModeParam_1
    
    self.spinBox_colorModeParam2
    -> self.ui.spinBox_colorModeParam_2
    
    self.checkableComboBox_ChoiceOfGroup
    -> self.ui.checkableComboBox_ChoiceOfGroup
    
    self.collapsibleButton_creationCSVFile
    -> self.ui.collapsibleButton_creationCSVFile
    
    self.collapsibleButton_previewClassificationGroups
    -> self.ui.collapsibleButton_previewClassificationGroups
    
    self.collapsibleGroupBox_previewVTKFiles
    -> self.ui.collapsibleGroupBox_previewVTKFiles
  4. Additional replacements in UI file