Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Eamon Doyle
roiTool
Commits
1df5631a
Commit
1df5631a
authored
Apr 10, 2024
by
Eamon Doyle
Browse files
cleanup and bugfixes
parent
5ff96515
Changes
1
Show whitespace changes
Inline
Side-by-side
mergeRoiTool.m
View file @
1df5631a
...
...
@@ -214,9 +214,9 @@ fp = [path '/' files(n).name];
dcmlist
(
end
)
.
fname
=
files
(
n
)
.
name
;
dcmlist
(
end
)
.
protocol
=
nfo
.
ProtocolName
;
end
setProgress
(
hObject
,
eventdata
,
handles
,
n
/
length
(
files
),[])
setProgress
(
hObject
,
eventdata
,
handles
,
n
/
length
(
files
),[])
;
end
setProgress
(
hObject
,
eventdata
,
handles
,
1
,
'Finished'
)
setProgress
(
hObject
,
eventdata
,
handles
,
1
,
'Finished'
)
;
if
length
(
dcmlist
)
<
1
error
(
'no dicoms found'
);
...
...
@@ -242,10 +242,10 @@ ha = handles.axes1;
h
=
imagesc
(
ha
,
zeros
(
330
));
colormap
(
'gray'
);
%get(h)
set
(
h
,
'HitTest'
,
'off'
)
set
(
h
,
'PickableParts'
,
'none'
)
get
(
ha
)
set
(
ha
,
'ButtonDownFcn'
,
@
axes1_ButtonDownFcn
)
set
(
h
,
'HitTest'
,
'off'
)
;
set
(
h
,
'PickableParts'
,
'none'
)
;
%
get(ha)
;
set
(
ha
,
'ButtonDownFcn'
,
@
axes1_ButtonDownFcn
)
;
handles
.
imageHandle
=
h
;
guidata
(
hObject
,
handles
);
...
...
@@ -371,7 +371,9 @@ path = handles.dcmlist(imagenum).path;
axes
(
handles
.
axes1
);
images
=
dicomread
(
path
);
%h = imagesc(images(:,:,1,1),'HitTest','off');
dcminfo
=
dicominfo
(
path
);
%h = imagesc(images(:,:,1,1),'HitTest','off');\
handles
.
dcminfo
=
dcminfo
;
set
(
handles
.
imageHandle
,
'CData'
,
images
(:,:,
1
,
1
));
%h = imagesc(images(:,:,1,1));
set
(
handles
.
sliceCount
,
'String'
,
sprintf
(
'/ %i'
,
size
(
images
,
4
)));
...
...
@@ -381,8 +383,10 @@ set(handles.sliceCount,'String',sprintf('/ %i',size(images,4)));
%set(h,'HitTest','off')
%set(h,'ButtonDownFcn',@axes1_ButtonDownFcn)
tsize
=
size
(
images
);
display
(
"matrix size"
);
display
(
tsize
);
if
handles
.
debug
display
(
"matrix size"
);
display
(
tsize
);
end
if
max
(
size
(
tsize
))
>
2
tsize
=
tsize
([
1
:
2
4
]);
end
...
...
@@ -400,6 +404,7 @@ handles.roiCoords = struct;
handles
.
roi
.
liver
=
roi
;
handles
.
roi
.
muscle
=
roi
;
handles
.
imageMat
=
images
;
handles
.
currentSlice
=
1
;
handles
.
needsReload
=
0
;
handles
.
climval
=
get
(
handles
.
axes1
,
'CLim'
);
set
(
handles
.
slider_color
,
'Value'
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment