コード例 #1
0
 def getLabelAt(self, position5d):
     labelSlot = self.topLevelOperatorView.WatershedLabels
     if labelSlot.ready():
         labelData = labelSlot[index2slice(position5d)].wait()
         return labelData.squeeze()[()]
     else:
         return None
コード例 #2
0
 def getLabelAt(self, position5d):
     labelSlot = self.topLevelOperatorView.WatershedLabels
     if labelSlot.ready():
         labelData = labelSlot[index2slice(position5d)].wait()
         return labelData.squeeze()[()]
     else:
         return None
コード例 #3
0
 def getLabelAt(self, currentImageIndex, position5d):
     labelSlot = self.mainOperator.WatershedLabels[currentImageIndex]
     if labelSlot.ready():
         labelData = labelSlot[ index2slice(position5d) ].wait()
         return labelData.squeeze()[()]
     else:
         return None
コード例 #4
0
ファイル: datasources.py プロジェクト: buotex/volumina
    def put( self, slicing, subarray, neutral = 0 ):
        '''Make an update of the wrapped arrays content.

        Elements with neutral value in the subarray are not written into the
        wrapped array, but the original values are kept.

        '''
        assert(len(slicing) == len(self._array.shape)), \
            "slicing into an array of shape=%r requested, but the slicing object is %r" % (slicing, self._array.shape)  
        self._array[slicing] = np.where(subarray!=neutral, subarray, self._array[slicing])
        pure = index2slice(slicing)
        self.setDirty(pure)
コード例 #5
0
ファイル: datasources.py プロジェクト: skarale25/volumina
    def put( self, slicing, subarray, neutral = 0 ):
        '''Make an update of the wrapped arrays content.

        Elements with neutral value in the subarray are not written into the
        wrapped array, but the original values are kept.

        '''
        assert(len(slicing) == len(self._array.shape)), \
            "slicing into an array of shape=%r requested, but the slicing object is %r" % (slicing, self._array.shape)  
        self._array[slicing] = np.where(subarray!=neutral, subarray, self._array[slicing])
        pure = index2slice(slicing)
        self.setDirty(pure)
コード例 #6
0
ファイル: arraysource.py プロジェクト: maximka48/volumina
    def put(self, slicing, subarray):
        """Make an update of the wrapped arrays content.

        Elements with neutral value in the subarray are not written into the
        wrapped array, but the original values are kept.

        """
        assert len(slicing) == len(
            self._array.shape
        ), "slicing into an array of shape=%r requested, but the slicing object is %r" % (
            slicing, self._array.shape)
        self._array[slicing] = subarray
        pure = index2slice(slicing)
        self.setDirty(pure)