Skip to content

Commit

Permalink
only good patches
Browse files Browse the repository at this point in the history
  • Loading branch information
kapoorlab committed Aug 11, 2023
1 parent 3786669 commit 187f833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
21 changes: 3 additions & 18 deletions src/oneat/NEATUtils/MovieCreator.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ def VolumeMaker(

currentsegimage = segimage[int(time), :].astype("uint16")
image_props = getHWD(
x, y, z, currentsegimage, imagesizex, imagesizey, imagesizez
x, y, z, currentsegimage
)
if image_props is not None:
height, width, depth, center, seg_label = image_props
Expand Down Expand Up @@ -1437,7 +1437,7 @@ def SegFreeImageMaker(
writer.writerows(Event_data)


def getHW(defaultX, defaultY, currentsegimage, imagesizex, imagesizey):
def getHW(defaultX, defaultY, currentsegimage):

properties = measure.regionprops(currentsegimage)

Expand All @@ -1456,22 +1456,13 @@ def getHW(defaultX, defaultY, currentsegimage, imagesizex, imagesizey):
width = abs(maxr - minr)
return height, width, center, SegLabel

if SegLabel == 0:

center = (defaultY, defaultX)
height = 0.5 * imagesizex
width = 0.5 * imagesizey
return height, width, center, SegLabel


def getHWD(
defaultX,
defaultY,
defaultZ,
currentsegimage,
imagesizex,
imagesizey,
imagesizez,
):

properties = measure.regionprops(currentsegimage)
Expand All @@ -1494,13 +1485,7 @@ def getHWD(
depth = abs(maxd - mind)
return height, width, depth, center, SegLabel

if SegLabel == 0:

center = (defaultZ, defaultY, defaultX)
height = 0.5 * imagesizex
width = 0.5 * imagesizey
depth = 0.5 * imagesizez
return height, width, depth, center, SegLabel



def save_full_training_data(directory, filename, data, label, axes):
Expand Down
4 changes: 2 additions & 2 deletions src/oneat/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = '6.3.9.dev0+g4829b08.d20230807'
__version_tuple__ = version_tuple = (6, 3, 9, 'dev0', 'g4829b08.d20230807')
__version__ = version = '6.4.1.dev0+g3786669.d20230808'
__version_tuple__ = version_tuple = (6, 4, 1, 'dev0', 'g3786669.d20230808')

0 comments on commit 187f833

Please sign in to comment.