What's Causing These Slicer / Python Errors

@pieper @lassoan @jcfr @jamesobutler

My module works perfectly except if I push the “Set Thickness” button first. Then hardly anything works. If I push other buttons first, everything works perfectly. We beta test next Monday, so HELP!!!

This issue is listed in tracker here: https://github.com/KitwareMedical/SlicerQReads/issues/103

Here’s the deal. After I push the “Set Threshold” button I get this error…

Traceback (most recent call last):
  File "/home/jcfr/Projects/SlicerQReads-Release/Slicer-build/lib/SlicerQReads-4.13/qt-scripted-modules/QReads.py", line 389, in updateGUIFromParameterNode
    QReadsLogic.slabThicknessInMmToNumberOfSlices(volumeNode, slabThicknessInMm))
  File "/home/jcfr/Projects/SlicerQReads-Release/Slicer-build/lib/SlicerQReads-4.13/qt-scripted-modules/QReads.py", line 612, in slabThicknessInMmToNumberOfSlices
    assert tichknessInMm > 0

Here’s the code segments at 389 and 612

 def updateGUIFromParameterNode(self, caller=None, event=None):
      QReadsLogic.setSlab(       (line 389)
          QReadsLogic.slabThicknessInMmToNumberOfSlices(volumeNode, slabThicknessInMm))
  def slabThicknessInMmToNumberOfSlices(volumeNode, tichknessInMm):
     if volumeNode is None:
      return 1
    assert tichknessInMm > 0  (line 612)
    return int(tichknessInMm / max(volumeNode.GetSpacing()))

… and no jokes anout

3 posts were merged into an existing topic: SlicerQR Development