def initializeFromNode(self):
        """
        Ensure parameter node exists and observed.
        """
        # Parameter node stores all user choices in parameter values, node selections, etc.
        # so that when the scene is saved and reloaded, these settings are restored.
        self.setParameterNode(self.logic.getParameterNode())
        segNode = self.segmentationNode
        if segNode is not None:
            self.ui.opacitySlider.setValue(segNode.GetDisplayNode().GetOpacity(
            ))

        Ensure parameter node exists and observed.
        
EISeg/med3d/EISegMed3D/EISegMed3D.py