Skip to content

Hyperplane update #1034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
756c385
working version
frheault Oct 30, 2023
db64932
Cleaner
frheault Oct 31, 2023
71840d9
working distance
frheault Nov 1, 2023
e84f084
WOrking euclidian and hyperplane
frheault Nov 2, 2023
1bafe3d
Best fastest version ever
frheault Nov 7, 2023
30a99b2
ALl but cleaning
frheault Nov 7, 2023
e5bb8d4
Ready to showcase version
frheault Nov 7, 2023
c5333db
Remove last 2
frheault Nov 8, 2023
77f2d54
Robust testing, docstring and logging
frheault Nov 8, 2023
52552df
Fix scaler
frheault Nov 24, 2023
e5be60c
Remerged with old branch
frheault Sep 30, 2024
e4a373f
Fix a few mistakes, deleted a file
frheault Oct 2, 2024
1616219
TODOs
frheault Oct 8, 2024
c915ac4
Change test file
frheault Oct 18, 2024
529646a
pep8
frheault Oct 18, 2024
6711efd
Working version
Nov 13, 2024
03337f7
Merge branch 'master' of github.com:scilus/scilpy into hyperplane_update
Nov 14, 2024
e829654
Fix a bunch of things
Nov 15, 2024
7511846
Merge branch 'master' of github.com:scilus/scilpy into hyperplane_update
frheault Nov 20, 2024
628811f
Default to centerline if cut
frheault Nov 21, 2024
6f40b80
Fix
frheault Nov 22, 2024
d37fdc6
Merge branch 'master' of github.com:scilus/scilpy into hyperplane_update
Dec 12, 2024
653e200
pep8 and merge
Dec 12, 2024
e92e9ca
Fix conflict
frheault Jan 28, 2025
59d9de0
pep8
frheault Jan 28, 2025
cd6d22b
Merge branch 'master' of github.com:scilus/scilpy into hyperplane_update
frheault Feb 3, 2025
dba593f
Charles comments and docstring
frheault Feb 3, 2025
23d65e5
Fix tests
frheault Feb 4, 2025
3ec0991
Start documentation
Feb 16, 2025
c48d8cc
documentation
Feb 16, 2025
03abd71
Merge branch 'master' into hyperplane_update
frheault Feb 20, 2025
6ac24e2
Most of Antoine comments
Feb 28, 2025
e876079
Merge branch 'master' of https://github.com/scilus/scilpy into hyperp…
frheault Mar 18, 2025
b82bfb3
trigger test
frheault Apr 7, 2025
4e20448
Merge branch 'master' of https://github.com/scilus/scilpy into hyperp…
frheault Apr 9, 2025
79d8244
Merge branch 'master' of https://github.com/scilus/scilpy into hyperp…
frheault Apr 9, 2025
1c6ee17
add hyperplane warning
frheault Apr 10, 2025
cd0d84c
use len for warning
frheault Apr 10, 2025
3df52a4
last comments
frheault Apr 14, 2025
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The library is now built for Python 3.10 so be sure to create a virtual environn
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.10 python3.10-dev python3.10-venv python3.10-minimal python3.10-tk
```
Python3.11 can work, Python3.12 is not supported.

Make sure your pip is up-to-date before trying to install:
```
Expand Down
9 changes: 4 additions & 5 deletions scilpy/tractanalysis/bundle_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def uniformize_bundle_sft(sft, axis=None, ref_bundle=None, swap=False):
old_origin = sft.origin
sft.to_vox()
sft.to_corner()

density = get_endpoints_density_map(sft, point_to_select=3)
indices = np.argwhere(density > 0)
kmeans = KMeans(n_clusters=2, random_state=0, copy_x=True,
Expand Down Expand Up @@ -89,9 +90,9 @@ def uniformize_bundle_sft(sft, axis=None, ref_bundle=None, swap=False):

if main_dir_displacement != main_dir_ends \
or main_dir_displacement != main_dir_barycenter:
logging.info('Ambiguity in orientation, you should use --axis')
logging.debug('Ambiguity in orientation, you should use --axis')
axis = axis_name[main_dir_displacement]
logging.info('Orienting endpoints in the {} axis'.format(axis))
logging.debug('Orienting endpoints in the {} axis'.format(axis))
axis_pos = axis_name.index(axis)

if bool(k_means_centers[0][axis_pos] >
Expand All @@ -117,8 +118,7 @@ def uniformize_bundle_sft(sft, axis=None, ref_bundle=None, swap=False):
else:
# Bitwise XOR
if (bool(labels[tuple(sft.streamlines[i][0].astype(int))] >
labels[tuple(sft.streamlines[i][-1].astype(int))])
^ bool(swap)):
labels[tuple(sft.streamlines[i][-1].astype(int))])):
sft.streamlines[i] = sft.streamlines[i][::-1]
for key in sft.data_per_point[i]:
sft.data_per_point[key][i] = \
Expand Down Expand Up @@ -342,4 +342,3 @@ def remove_outliers_qb(streamlines, threshold, nb_points=12, nb_samplings=30,
outliers_ids, inliers_ids = prune(streamlines, threshold, summary)

return outliers_ids, inliers_ids

Loading