Skip to content

Commit

Permalink
First tagged commit
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenThornquist committed Sep 3, 2023
1 parent 7479554 commit 6251678
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 43 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# SiffRoi

TODO:
- Rework `UsesReferenceFramesMixin` to make it opt-out: if
there's no reference frames, it can use the `PHOTON_COUNTS`
layer or something similar. Maybe this is a `siff-napari`
thing to change how to pass in the data, though...

Tools for `ROI` annotation, segmentation, etc.

This is meant to be `napari` agnostic without being _too_
Expand Down
44 changes: 44 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
{% set project = pyproject.get('project',{}) %}

package:
name: {{ project.get('name') }}
version: {{ project.get('version') }}

source:
path: ../
git_url: ../
#git_url: https://github.com/maimonlab/siffpy.git

build:
number: {{ GIT_DESCRIBE_NUMBER }}
script: "{{ PYTHON }} -m pip install '.'"

requirements:
build:
- python >=3.9
- pip
- setuptools>=45
- setuptools_scm[toml]>=6.2
- wheel
- numpy >=1.15
host:
- python >=3.9
- numpy >=1.15
- scipy
- h5py
run:
- python >=3.9
- numpy >=1.15
- scipy
- h5py

about:
home: "https://github.com/maimonlab/siffroi"
summary : {{ project.get('description') }}
license: {{ project.get('license', {}).get('text') }}
#license_file: ../LICENSE.md

extra:
recipe-maintainers:
- StephenThornquist
43 changes: 0 additions & 43 deletions siffroi/ellipsoid_body/protocols/use_ellipse.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,49 +105,6 @@ def use_ellipse(
# and bypass the hullabaloo below
FROM_MASK = True

# if slice_idx is None:
# # Get the biggest for all planes
# if FROM_MASK:
# ellipses_by_slice = [
# [ellipse for ellipse in ellipses if np.any(ellipse[slice_idx])]
# for slice_idx in range(image_shape[0])
# ]
# slicewise_idx = [
# np.argsort([np.sum(ellipse) for ellipse in slicewise_ellipses])
# if len(slicewise_ellipses) > 0
# else None
# for slicewise_ellipses in ellipses_by_slice
# ]

# slicewise_biggest_ellipse = [
# slicewise_ellipses[sorted_slicewise[-1]]
# if sorted_slicewise is not None
# else np.zeros(image_shape, dtype=bool)
# for slicewise_ellipses, sorted_slicewise in zip(ellipses_by_slice, slicewise_idx)
# ]

# main_ellip = np.logical_or.reduce(slicewise_biggest_ellipse)

# else:
# raise NotImplementedError("Use ellipse only supports masks for now")

# else:
# size_sorted_idx = np.argsort(
# [
# np.sum(ellipse)
# for ellipse in ellipses
# if np.round(ellipse[0][0]) == slice_idx
# ]
# ) if FROM_MASK else np.argsort(
# [
# polygon_area(ellipse)
# for ellipse in ellipses
# if np.round(ellipse[0][0]) == slice_idx
# ]
# )

# main_ellip = ellipses[size_sorted_idx[-1]]

center = None

if (ExtraRois(extra_rois) == ExtraRois.CENTER):
Expand Down

0 comments on commit 6251678

Please sign in to comment.