def updateImage(self, val):
        """
        Hlavni update metoda.
        Cinny kod pro gaussovske filtrovani, prahovani, binarni uzavreni a
        otevreni a vraceni nejvetsich nebo oznacenych objektu.

        """

        # import ipdb
        # ipdb.set_trace()

        # Filtrovani

        # Zjisteni jakou sigmu pouzit
        if(self.firstRun == True and self.inputSigma >= 0):
            sigma = np.round(self.inputSigma, 2)
        elif self.interactivity:
            sigma = np.round(self.ssigma.val, 2)
        else:
            sigma = np.round(self.inputSigma, 2)


        # Prahovani (smin, smax)

        # max_threshold = self.threshold_upper
        # min_threshold = self.threshold

        if self.interactivity:

            self.smin.val = (np.round(self.smin.val, 2))
            self.smin.valtext.set_text('{}'.format(self.smin.val))
            self.smax.val = (np.round(self.smax.val, 2))
            self.smax.valtext.set_text('{}'.format(self.smax.val))

            self.threshold = self.smin.val
            self.threshold_upper = self.smax.val

            closeNum = int(np.round(self.sclose.val, 0))
            openNum = int(np.round(self.sopen.val, 0))
            self.sclose.valtext.set_text('{}'.format(closeNum))
            self.sopen.valtext.set_text('{}'.format(openNum))

        else:

            closeNum = self.ICBinaryClosingIterations
            openNum = self.ICBinaryOpeningIterations

        # make_image_processing(sigma, min_threshold, max_threshold, closeNum, openNum, auto_method=self.)
        self.imgFiltering, self.threshold = make_image_processing(data=self.data, voxelsize_mm=self.voxelsize_mm,
                                                                  seeds=self.seeds, sigma_mm=sigma,
                                                                  min_threshold=self.threshold,
                                                                  max_threshold=self.threshold_upper, closeNum=closeNum,
                                                                  openNum=openNum,
                                                                  min_threshold_auto_method=self.auto_method,
                                                                  fill_holes=self.fillHoles,
                                                                  get_priority_objects=self.get_priority_objects,
                                                                  nObj=self.nObj)
        # Vykresleni dat
        if (self.interactivity == True):
            self.drawVisualization()

        # Nastaveni kontrolnich hodnot
        self.firstRun = False

        garbage.collect()

        self.debugInfo()
def updateImage ( self , val ) : if ( self . firstRun == True and self . inputSigma >= 0 ) : sigma = np . round ( self . inputSigma , 2 ) elif self . interactivity : sigma = np . round ( self . ssigma . val , 2 ) else : sigma = np . round ( self . inputSigma , 2 ) if self . interactivity : self . smin . val = ( np . round ( self . smin . val , 2 ) ) self . smin . valtext . set_text ( '{}' . format ( self . smin . val ) ) self . smax . val = ( np . round ( self . smax . val , 2 ) ) self . smax . valtext . set_text ( '{}' . format ( self . smax . val ) ) self . threshold = self . smin . val self . threshold_upper = self . smax . val closeNum = int ( np . round ( self . sclose . val , 0 ) ) openNum = int ( np . round ( self . sopen . val , 0 ) ) self . sclose . valtext . set_text ( '{}' . format ( closeNum ) ) self . sopen . valtext . set_text ( '{}' . format ( openNum ) ) else : closeNum = self . ICBinaryClosingIterations openNum = self . ICBinaryOpeningIterations self . imgFiltering , self . threshold = make_image_processing ( data = self . data , voxelsize_mm = self . voxelsize_mm , seeds = self . seeds , sigma_mm = sigma , min_threshold = self . threshold , max_threshold = self . threshold_upper , closeNum = closeNum , openNum = openNum , min_threshold_auto_method = self . auto_method , fill_holes = self . fillHoles , get_priority_objects = self . get_priority_objects , nObj = self . nObj ) if ( self . interactivity == True ) : self . drawVisualization ( ) self . firstRun = False garbage . collect ( ) self . debugInfo ( )
Hlavni update metoda.
        Cinny kod pro gaussovske filtrovani, prahovani, binarni uzavreni a
        otevreni a vraceni nejvetsich nebo oznacenych objektu.