<commit_before>'''
Created on Sep 29, 2014

@author: <NAME> (Brigham and Women's Hospital)
'''
from __main__ import qt, slicer, vtk
from Editor import EditorWidget
from . import CIP_EditBox
 
class CIP_EditorWidget(EditorWidget):
    """Customized Slicer Editor which contains just some the tools that we need for the lung segmentation"""

    def __init__(self, parent=None, showVolumesFrame=True, activeTools=("DefaultTool", "PaintEffect", "DrawEffect", "LevelTracingEffect", "RectangleEffect", "EraseLabel", "PreviousCheckPoint", "NextCheckPoint")):
        """Constructor. Just invokes the parent's constructor"""         
        self.activeTools = activeTools
        EditorWidget.__init__(self, parent, showVolumesFrame)

    @property
    def masterVolume(self):
        return slicer.util.getNode(self.helper.masterSelector.currentNodeID)

    @masterVolume.setter
    def masterVolume(self, value):
        self.helper.master = value
        self.helper.masterSelector.setCurrentNode(value)

    @property
    def labelmapVolume(self):
        return slicer.util.getNode(self.helper.mergeSelector.currentNodeID)

    @labelmapVolume.setter
    def labelmapVolume(self, value):
        self.helper.merge = value
        self.helper.mergeSelector.setCurrentNode(value)

    def createEditBox(self):
        """Override the parent's method. Builds the editor with a limited set of tools"""
        self.editBoxFrame = qt.QFrame(self.effectsToolsFrame)<commit_msg>FIX: adapt CIP Editor to Slicer Editor (yes, the master-labelmap node handling changed again...)<commit_after>'''
Created on Sep 29, 2014

@author: <NAME> (Brigham and Women's Hospital)
'''
from __main__ import qt, slicer, vtk
from Editor import EditorWidget
from . import CIP_EditBox
 
class CIP_EditorWidget(EditorWidget):
    """Customized Slicer Editor which contains just some the tools that we need for the lung segmentation"""

    def __init__(self, parent=None, showVolumesFrame=True, activeTools=("DefaultTool", "PaintEffect", "DrawEffect", "LevelTracingEffect", "RectangleEffect", "EraseLabel", "PreviousCheckPoint", "NextCheckPoint")):
        """Constructor. Just invokes the parent's constructor"""         
        self.activeTools = activeTools
        EditorWidget.__init__(self, parent, showVolumesFrame)

    @property
    def masterVolume(self):
        return slicer.util.getNode(self.helper.masterSelector.currentNodeID)

    @masterVolume.setter
    def masterVolume(self, value):
        # self.helper.master = value
        # self.helper.masterSelector.setCurrentNode(value)
        self.helper.setMasterVolume(value)

    @property
    def labelmapVolume(self):
        return slicer.util.getNode(self.helper.mergeSelector.currentNodeID)

    @labelmapVolume.setter
    def labelmapVolume(self, value):
        #self.helper.merge = value
        #self.helper.mergeSelector.setCurrentNode(value)
        self.helper.setMergeVolume(value)

    def createEditBox(self):
        """Override the parent's method. Builds the editor with a limited set of tools"""
        self.editBoxFrame = qt.QFrame(self.effectsToolsFrame)
{'fraction_non_alphanumeric': 0.09955041746949261, 'fraction_numerical': 0.0038535645472061657, 'mean_word_length': 3.976038338658147, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5775409', 'n_tokens_mistral': 890, 'n_tokens_neox': 856, 'n_words': 228}