Skip to content

Commit

Permalink
autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
FattanePourakpour committed Nov 6, 2024
1 parent 7d27310 commit 07938af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions histomicstk/features/compute_fsd_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ def compute_fsd_features(im_label, K=128, Fs=6, Delta=8, rprops=None):
"""
import pandas as pd
from skimage.measure import regionprops

from histomicstk.segmentation.label import trace_object_boundaries

# List of feature names
feature_list = []
for i in range(Fs):
feature_list = np.append(feature_list, "Shape.FSD" + str(i + 1))
feature_list = np.append(feature_list, 'Shape.FSD' + str(i + 1))

# get Label size x
sizex = im_label.shape[0]
Expand Down Expand Up @@ -76,7 +77,7 @@ def compute_fsd_features(im_label, K=128, Fs=6, Delta=8, rprops=None):

# grab label mask
lmask = (im_label[min_row:max_row, min_col:max_col] == rprops[i].label).astype(
bool
bool,
)
# find boundaries
Bounds = trace_object_boundaries(
Expand Down Expand Up @@ -207,7 +208,7 @@ def _FSDs(X, Y, K, Intervals):
# calculate 'F' values
for i in range(L - 1):
F[i] = np.round(
fX[Intervals[i] - 1 : Intervals[i + 1]].sum(),
fX[Intervals[i] - 1: Intervals[i + 1]].sum(),
L,
).real.astype(float)

Expand Down

0 comments on commit 07938af

Please sign in to comment.