forked from MouseLightPipeline/pipeline-featmatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_problematic_pair_1_from_2020_11_26.m
38 lines (34 loc) · 2.1 KB
/
run_problematic_pair_1_from_2020_11_26.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
do_force_computation = false ;
script_folder_path = fileparts(mfilename('fullpath')) ;
memo_folder_path = fullfile(script_folder_path, 'memos') ;
% Build an index of the paths to raw tiles
sample_date = '2020-11-26' ;
raw_tiles_path = sprintf('/groups/mousebrainmicro/mousebrainmicro/data/%s/Tiling', sample_date) ;
descriptors_path = fullfile('/nrs/mouselight/pipeline_output', sample_date, 'stage_3_descriptor_output') ;
%z_point_match_path = fullfile('/nrs/mouselight/pipeline_output', sample_date, 'stage_4_point_match_output') ;
z_point_match_path = fullfile(script_folder_path, sample_date, 'stage_4_point_match_output') ;
% Build the tile index
raw_tile_index = compute_or_read_from_memo(memo_folder_path, ...
sprintf('raw-tile-index-%s', sample_date), ...
@()(build_raw_tile_index(raw_tiles_path)), ...
do_force_computation) ;
tile_index_from_ijk1 = raw_tile_index.tile_index_from_ijk1 ;
ijk1_from_tile_index = raw_tile_index.ijk1_from_tile_index ;
xyz_from_tile_index = raw_tile_index.xyz_from_tile_index ;
relative_path_from_tile_index = raw_tile_index.relative_path_from_tile_index ;
tile_lattice_shape = size(tile_index_from_ijk1)
tile_count = length(relative_path_from_tile_index)
% Find the problematic pair
central_tile_relative_path = '2020-12-01/01/01916'
central_tile_index = find(strcmp(central_tile_relative_path, relative_path_from_tile_index))
central_tile_ijk1 = ijk1_from_tile_index(central_tile_index, :)
other_tile_ijk1 = central_tile_ijk1 + [0 0 1] ;
other_tile_index = tile_index_from_ijk1(other_tile_ijk1(1), other_tile_ijk1(2), other_tile_ijk1(3))
other_tile_relative_path = relative_path_from_tile_index{other_tile_index}
% Run z point match on the pair
run_pointmatch_on_single_pair(raw_tiles_path, ...
descriptors_path, ...
z_point_match_path, ...
central_tile_relative_path, ...
central_tile_ijk1, ...
other_tile_relative_path)