Commit 1df5631a authored by Eamon Doyle's avatar Eamon Doyle
Browse files

cleanup and bugfixes

parent 5ff96515
...@@ -214,9 +214,9 @@ fp = [path '/' files(n).name]; ...@@ -214,9 +214,9 @@ fp = [path '/' files(n).name];
dcmlist(end).fname = files(n).name; dcmlist(end).fname = files(n).name;
dcmlist(end).protocol = nfo.ProtocolName; dcmlist(end).protocol = nfo.ProtocolName;
end end
setProgress(hObject, eventdata, handles,n/length(files),[]) setProgress(hObject, eventdata, handles,n/length(files),[]);
end end
setProgress(hObject, eventdata, handles,1,'Finished') setProgress(hObject, eventdata, handles,1,'Finished');
if length(dcmlist) < 1 if length(dcmlist) < 1
error('no dicoms found'); error('no dicoms found');
...@@ -242,10 +242,10 @@ ha = handles.axes1; ...@@ -242,10 +242,10 @@ ha = handles.axes1;
h = imagesc(ha,zeros(330)); h = imagesc(ha,zeros(330));
colormap('gray'); colormap('gray');
%get(h) %get(h)
set(h,'HitTest','off') set(h,'HitTest','off');
set(h,'PickableParts','none') set(h,'PickableParts','none');
get(ha) %get(ha);
set(ha,'ButtonDownFcn',@axes1_ButtonDownFcn) set(ha,'ButtonDownFcn',@axes1_ButtonDownFcn);
handles.imageHandle = h; handles.imageHandle = h;
guidata(hObject,handles); guidata(hObject,handles);
...@@ -371,7 +371,9 @@ path = handles.dcmlist(imagenum).path; ...@@ -371,7 +371,9 @@ path = handles.dcmlist(imagenum).path;
axes(handles.axes1); axes(handles.axes1);
images = dicomread(path); 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)); set(handles.imageHandle,'CData',images(:,:,1,1));
%h = imagesc(images(:,:,1,1)); %h = imagesc(images(:,:,1,1));
set(handles.sliceCount,'String',sprintf('/ %i',size(images,4))); set(handles.sliceCount,'String',sprintf('/ %i',size(images,4)));
...@@ -381,8 +383,10 @@ 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,'HitTest','off')
%set(h,'ButtonDownFcn',@axes1_ButtonDownFcn) %set(h,'ButtonDownFcn',@axes1_ButtonDownFcn)
tsize = size(images); tsize = size(images);
display("matrix size"); if handles.debug
display(tsize); display("matrix size");
display(tsize);
end
if max(size(tsize)) > 2 if max(size(tsize)) > 2
tsize = tsize([1:2 4]); tsize = tsize([1:2 4]);
end end
...@@ -400,6 +404,7 @@ handles.roiCoords = struct; ...@@ -400,6 +404,7 @@ handles.roiCoords = struct;
handles.roi.liver = roi; handles.roi.liver = roi;
handles.roi.muscle = roi; handles.roi.muscle = roi;
handles.imageMat = images; handles.imageMat = images;
handles.currentSlice = 1;
handles.needsReload = 0; handles.needsReload = 0;
handles.climval = get(handles.axes1,'CLim'); handles.climval = get(handles.axes1,'CLim');
set(handles.slider_color,'Value',1); set(handles.slider_color,'Value',1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment