Skip to content

Commit

Permalink
STYLE: Update name of ivar in onLoadPV to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Oct 31, 2024
1 parent bcd10a2 commit a59bba8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions AutoscoperM/AutoscoperM.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,18 +780,18 @@ def onLoadPV(self):
for i in range(len(vols)):
nodeName = os.path.splitext(os.path.basename(vols[i]))[0]
volumeNode = slicer.util.loadVolume(vols[i])
translationNodeName = os.path.join(mainOutputDir, transformSubDir, f"{nodeName}_t.tfm")
scaleNodeName = os.path.join(mainOutputDir, transformSubDir, f"{nodeName}_scale.tfm")
if not os.path.exists(translationNodeName):
translationTransformFileName = os.path.join(mainOutputDir, transformSubDir, f"{nodeName}_t.tfm")
scaleTranformFileName = os.path.join(mainOutputDir, transformSubDir, f"{nodeName}_scale.tfm")
if not os.path.exists(translationTransformFileName):
raise ValueError(
f"Failed to load partial volume {nodeName}: Corresponding translation transform file {translationNodeName} not found"
f"Failed to load partial volume {nodeName}: Corresponding translation transform file {translationTransformFileName} not found"
)
if not os.path.exists(scaleNodeName):
if not os.path.exists(scaleTranformFileName):
raise ValueError(
f"Failed to load partial volume {nodeName}: Corresponding scaling transform file {scaleNodeName} not found"
f"Failed to load partial volume {nodeName}: Corresponding scaling transform file {scaleTranformFileName} not found"
)
translationNode = slicer.util.loadTransform(translationNodeName)
scaleNode = slicer.util.loadTransform(scaleNodeName)
translationNode = slicer.util.loadTransform(translationTransformFileName)
scaleNode = slicer.util.loadTransform(scaleTranformFileName)

volumeNode.SetAndObserveTransformNodeID(scaleNode.GetID())
scaleNode.SetAndObserveTransformNodeID(translationNode.GetID())
Expand Down

0 comments on commit a59bba8

Please sign in to comment.