def onApply(self):
    if not self.inspvolumesAreValid():
      qt.QMessageBox.warning(slicer.util.mainWindow(),
          "Parenchyma Analysis", "Inspiratory Volumes do not have the same geometry.")
      return

    if not self.expvolumesAreValid():
      qt.QMessageBox.warning(slicer.util.mainWindow(),
          "Parenchyma Analysis", "Expiratory Volumes do not have the same geometry.")
      return
    
    self.applyButton.text = "Working..."
    # TODO: why doesn't processEvents alone make the label text change?
    self.applyButton.repaint()
    slicer.app.processEvents()
    self.logic = ParenchymaAnalysisLogic(self.inspNode, self.insplabelNode,self.expNode,self.explabelNode)
    self.populateStats()
    self.chartFrame.enabled = True
    self.saveButton.enabled = True
    self.applyButton.text = "Apply"
Calculate the parenchyma analysis
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/ParenchymaAnalysis/ParenchymaAnalysis.py/ParenchymaAnalysisWidget.onApply