Skip to content

Commit

Permalink
Slice view in uiThreshold. Close #105
Browse files Browse the repository at this point in the history
  • Loading branch information
mjirik committed Feb 10, 2015
1 parent b5ee20a commit 3ea67bb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lisa/uiThreshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ def __init__(self, data, voxel, threshold=-1, interactivity=True,
abs(abs(self.min0) - abs(self.max0)) / 10

# Pridani subplotu do okna (do figure)
self.ax1 = self.fig.add_subplot(131)
self.ax2 = self.fig.add_subplot(132)
self.ax3 = self.fig.add_subplot(133)
self.ax1 = self.fig.add_subplot(222)
self.ax2 = self.fig.add_subplot(223)
self.ax3 = self.fig.add_subplot(224)
self.ax4 = self.fig.add_subplot(221)

# Upraveni subplotu
self.fig.subplots_adjust(left=0.1, bottom=0.3)
Expand Down Expand Up @@ -460,6 +461,14 @@ def getBiggestObjects(self):
self.imgFiltering = thresholding_functions.getPriorityObjects(
self.imgFiltering, self.nObj, self.seeds)

def __drawSegmentedSlice(self, ax, contour, i):
ax.cla()
ax.imshow(self.data[i, :, :], cmap=self.cmap)
if contour is not None:
ax.contour(contour[i, :, :])
# import sed3
# sed3.sed3(contour, show=True)

def drawVisualization(self):
"""
Expand Down Expand Up @@ -498,6 +507,7 @@ def drawVisualization(self):
# del(img1)
# del(img2)

self.__drawSegmentedSlice(self.ax4, self.imgFiltering, self.imgFiltering.shape[0]/2)
# Prekresleni
self.fig.canvas.draw()

Expand Down

0 comments on commit 3ea67bb

Please sign in to comment.