            obj.setAlphaData(img);
        end
        
        %% undoLastPoint
        % Unpaints and removes the newest click in the stack
        function undoLastPoint(obj)
            x = obj.stack(end, 1);
            y = obj.stack(end, 2);
            
            obj.unpaint(x, y);
            obj.removeClickFromStack(x, y);
        end
        
        %% clear
        % Clear all CData, AlphaData and the stack.
        function clear(obj)
            for i = 1 : length(obj.stack)
                