Changeset 168


Ignore:
Timestamp:
Jun 1, 2011, 12:39:53 PM (6 years ago)
Author:
tjniskan
Message:
  • Fixed a bug in filling voxel ROIs. In some situations trying to fill a ROI from a seed voxel that

already belonged to the ROI removed the ROI completely from that slice. The Undo buffer was also
unnecessarily updated.

M aedes.m
M aedes_revision.m
M aedes_roifill.m

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • aedes.m

    r166 r168  
    29672967
    29682968% Detect Matlab version
    2969 Dat.MatlabVersion = aedes_getmatlabversion;
     2969[Dat.MatlabVersion,Dat.isImageProc] = aedes_getmatlabversion;
    29702970
    29712971% If any of the currently opened files is Analyze or NIfTI type, the
     
    79637963end
    79647964
     7965if I(x,y)
     7966        % Nothing to fill...
     7967        return
     7968end
     7969
     7970% Add undo information to buffer
     7971l_RoiUndoBuffer('add',roi_ind,ax_ind);
     7972
    79657973% Check if Image Processing toolbox is installed and we if could use imfill
    79667974% function which is much faster than aedes_roifill for doing the flood fill
     
    97539761                'windowbuttonupfcn',...
    97549762                @l_WindowButtonUpFcn)
    9755     else
    9756       % Add undo information to buffer
    9757       l_RoiUndoBuffer('add',roi_ind,ax_ind);
     9763                else
    97589764     
    97599765      % Fill ROI
  • aedes_revision.m

    r167 r168  
    9393% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - SVN Hook -
     95% - Svn Hook -
  • aedes_roifill.m

    r148 r168  
    3232% Flood fill algorithm to be used
    3333method = 1;
     34
     35% Look for a quick return
     36if bw(seed(1),seed(2))
     37        % Seed pixel is 1, no need to do anything...
     38        bw_out = bw;
     39        return
     40end
    3441
    3542% matrix of linear indices
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008