Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
__pycache__/
*.pyc
*.pyo
/*.py
.ipynb_checkpoints/
*.ipynb
!library_demo.ipynb

# Local data and generated outputs
/111/
Expand All @@ -19,6 +22,4 @@ TODO.md
app.png
autoflow_mri.egg-info/
build/
test.ipynb
utils_bgc.py
/scripts/
/scripts/
2 changes: 1 addition & 1 deletion algorithms.py → autoflow/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scipy.signal import savgol_filter
from skimage.morphology import skeletonize

from models import PlaneData, GraphData, SkeletonParams
from .models import PlaneData, GraphData, SkeletonParams


def _axis_pair(a):
Expand Down
4 changes: 2 additions & 2 deletions autoflow/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import numpy as np

from models import Workspace
from utils import collect_h5_files, process_single, resolve_reuse_plane_file
from .models import Workspace
from .utils import collect_h5_files, process_single, resolve_reuse_plane_file

DEFAULT_WSS_BAR_CFG = {
"position_x": 0.75,
Expand Down
12 changes: 6 additions & 6 deletions app.py → autoflow/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
from pyvistaqt import QtInteractor
from pyvista import _vtk

from models import Workspace, StepId, ObjectKind
from pipeline import PipelineEngine
from viewer import SceneController
from editors import SkeletonEditor, PlaneEditor
from ortho_viewer import OrthoViewer
from algorithms import compute_plane_metrics, apply_internal_consistency_to_metrics, compute_plane_metrics_multithread
from .models import Workspace, StepId, ObjectKind
from .pipeline import PipelineEngine
from .viewer import SceneController
from .editors import SkeletonEditor, PlaneEditor
from .ortho_viewer import OrthoViewer
from .algorithms import compute_plane_metrics, apply_internal_consistency_to_metrics, compute_plane_metrics_multithread


def _parse_plane_index(data_key):
Expand Down
2 changes: 1 addition & 1 deletion editors.py → autoflow/editors.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from models import PlaneData, GraphData
from .models import PlaneData, GraphData


class SkeletonEditor:
Expand Down
2 changes: 1 addition & 1 deletion autoflow/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def launch_gui() -> None:
try:
from app import main as app_main
from .app import main as app_main
except ModuleNotFoundError as exc:
module_name = exc.name or ""
base_name = module_name.split(".", 1)[0]
Expand Down
4 changes: 2 additions & 2 deletions io_utils.py → autoflow/io_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import json
from models import Workspace
from .models import Workspace


def save_workspace_file(path, workspace):
Expand All @@ -12,4 +12,4 @@ def load_workspace_file(path):
d = json.load(f)
ws = Workspace()
ws.restore_dict(d)
return ws
return ws
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pipeline.py → autoflow/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import numpy as np

from models import StepId, ObjectKind
from algorithms import (
from .models import StepId, ObjectKind
from .algorithms import (
load_h5_data,
filter_segmask_labels, merge_segmask_to_3d,
preprocess_mask_for_skeleton,
Expand Down Expand Up @@ -124,7 +124,7 @@ def run_step(self, ws, step, log):
def _step_generate_skeleton(self, ws):
self.preprocess(ws)
if ws.skeleton_params.remove_small_cc:
from algorithms import remove_small_cc_from_binary_mask
from .algorithms import remove_small_cc_from_binary_mask
ws.segmask_binary = remove_small_cc_from_binary_mask(
ws.segmask_binary, ws.resolution, ws.skeleton_params.min_cc_volume_mm3)
ws.segmask_3d = merge_segmask_to_3d(ws.segmask_binary)
Expand Down
6 changes: 3 additions & 3 deletions utils.py → autoflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import imageio.v2 as imageio
from PIL import Image

from models import Workspace, StepId, PlaneData
from pipeline import PipelineEngine
from algorithms import (
from .models import Workspace, StepId, PlaneData
from .pipeline import PipelineEngine
from .algorithms import (
load_metrics_as_table,
compute_derived_metrics,
create_uniform_grid,
Expand Down
4 changes: 2 additions & 2 deletions viewer.py → autoflow/viewer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
import pyvista as pv

from models import ObjectKind
from algorithms import (
from .models import ObjectKind
from .algorithms import (
build_multilabel_surface_t,
build_surface_from_mask3d,
graph_to_polydata,
Expand Down
14 changes: 0 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,6 @@ test = [
autoflow-run = "autoflow.cli:main"
autoflow-gui = "autoflow.gui:main"

[tool.setuptools]
include-package-data = false
py-modules = [
"algorithms",
"app",
"editors",
"io_utils",
"models",
"ortho_viewer",
"pipeline",
"utils",
"viewer",
]

[tool.setuptools.packages.find]
include = ["autoflow"]

Expand Down
Loading