<commit_before># ! /usr/bin/python
# -*- coding: utf-8 -*-


# import funkcí z jiného adresáře
import sys
import os.path

# imcut_path =  os.path.join(path_to_script, "../../imcut/")
# sys.path.insert(0, imcut_path)
import unittest

import numpy as np
from nose.plugins.attrib import attr


from lisa import organ_segmentation
import imcut.dcmreaddata as dcmr
import lisa.dataset
import io3d.datasets


# nosetests tests/organ_segmentation_test.py:OrganSegmentationTest.test_create_iparams # noqa



class CoinaudSegmentationTest(unittest.TestCase):
    interactiveTest = False
    verbose = False


    def test_devel_vein_basin_segmentation(self):
        pth = r"E:\data\medical\processed\mik2018 para\P09_paraall_cropped.pklz"
        datap = io3d.read(pth)
        labels = {
            "1": 1,
            "2": 2,
            "3": 3,
            "4": 4,
            "5": 5,
            "6": 6,
        }
        from PyQt4.QtGui import QApplication, QPushButton
        app = QApplication(sys.argv)
        import seededitorqt
        se = seededitorqt.QTSeedEditor(datap["data3d"], contours=datap["segmentation"], labels=labels)

        def split(obj):
            import lisa.virtual_resection as vr
            print(np.max(datap["data3d"]))
            print(np.unique(se.seeds))
            out, sepobj = vr.split_vessel(datap, se.seeds, method="separate labels", input_seeds_label2=2)
            print(np.unique(out))
            se.seeds = out
            se.contours = out
            se.setView(se.actual_view)
        qpb = QPushButton("Ahoj")
        qpb.clicked.connect(split)
        wg = se.my_layout.layout().itemAt(0).itemAt(2).addWidget(qpb)

        se.exec_()<commit_msg>skip test<commit_after># ! /usr/bin/python
# -*- coding: utf-8 -*-


# import funkcí z jiného adresáře
import sys
import os.path

# imcut_path =  os.path.join(path_to_script, "../../imcut/")
# sys.path.insert(0, imcut_path)
import unittest

import numpy as np
from nose.plugins.attrib import attr


from lisa import organ_segmentation
import imcut.dcmreaddata as dcmr
import lisa.dataset
import io3d.datasets


# nosetests tests/organ_segmentation_test.py:OrganSegmentationTest.test_create_iparams # noqa



class CoinaudSegmentationTest(unittest.TestCase):
    interactiveTest = False
    verbose = False


    @unittest.skip("Waiting for implementation")
    def test_devel_vein_basin_segmentation(self):
        pth = r"E:\data\medical\processed\mik2018 para\P09_paraall_cropped.pklz"
        datap = io3d.read(pth)
        labels = {
            "1": 1,
            "2": 2,
            "3": 3,
            "4": 4,
            "5": 5,
            "6": 6,
        }
        from PyQt4.QtGui import QApplication, QPushButton
        app = QApplication(sys.argv)
        import seededitorqt
        se = seededitorqt.QTSeedEditor(datap["data3d"], contours=datap["segmentation"])

        def split(obj):
            import lisa.virtual_resection as vr
            print(np.max(datap["data3d"]))
            print(np.unique(se.seeds))
            out, sepobj = vr.split_vessel(datap, se.seeds, method="separate labels", input_seeds_label2=2)
            print(np.unique(out))
            se.seeds = out
            se.contours = out
            se.setView(se.actual_view)
        qpb = QPushButton("Ahoj")
        qpb.clicked.connect(split)
        wg = se.my_layout.layout().itemAt(0).itemAt(2).addWidget(qpb)

        se.exec_()
{'fraction_non_alphanumeric': 0.11493582263710618, 'fraction_numerical': 0.01691948658109685, 'mean_word_length': 2.467138523761375, 'pattern_counts': {'":': 12, '<': 3, '<?xml version=': 0, '>': 3, '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': '7233514', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1160, 'n_words': 220}