-
Notifications
You must be signed in to change notification settings - Fork 0
/
visualize.m
38 lines (29 loc) · 948 Bytes
/
visualize.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
clear
close all
addpath utils;
addpath 'qcut_utils';
parent_path = 'LiverOutput/';
datasets = load([parent_path, 'liver.mat']);
%data = datasets.SalMap
column_idx = 1;
scan = 'C';
chunk='bottom'; % either top or bottom
dataset_idx = datasets(column_idx);
data = dataset_idx.SalMap(1);
dataset_name = ['Column_' num2str(dataset_idx) ];
dataset_path = [ parent_path dataset_name '/' ];
disp([dataset_name '... started with ' chunk ' chunk' ]);
% Parse paths
stack_path = [dataset_path scan '/' chunk '.mat'];
gt_path = [dataset_path 'gt_' chunk '.mat'];
path_out = [dataset_path scan '/' chunk '_out.mat'];
% Load data
data = load(stack_path); data = data.(chunk);
gt = load(gt_path); gt = gt.(['gt_' chunk]);
output = load(path_out);
output_mean=mean(output.SalMap,4);
output = double(output_mean>=0.75);
% Normalize data
data = double(data)/255;
implay([data output])
disp([dataset_name '... DONE']);