From: <car...@us...> - 2012-09-02 02:44:29
|
Revision: 10944 http://octave.svn.sourceforge.net/octave/?rev=10944&view=rev Author: carandraug Date: 2012-09-02 02:44:23 +0000 (Sun, 02 Sep 2012) Log Message: ----------- isind: use shared private functions for checks Modified Paths: -------------- trunk/octave-forge/main/image/inst/isind.m Modified: trunk/octave-forge/main/image/inst/isind.m =================================================================== --- trunk/octave-forge/main/image/inst/isind.m 2012-09-02 02:37:12 UTC (rev 10943) +++ trunk/octave-forge/main/image/inst/isind.m 2012-09-02 02:44:23 UTC (rev 10944) @@ -37,15 +37,12 @@ endif bool = false; - if (ismatrix (img) && ndims (img) == 2 && !issparse (img) && isreal (img) && !isempty (img)) + if (!isimage (img)) + bool = false; + elseif (ndims (img) == 2 && isreal (img)) switch (class (img)) case "double" - ## to speed this up, we can look at a sample of the image first - bool = is_ind_double (img(1:ceil (rows (img) /100), 1:ceil (columns (img) /100))); - if (bool) - ## sample was true, we better make sure it's real - bool = is_ind_double (img); - endif + bool = ispart (@is_ind_double, img); case {"uint8", "uint16"} bool = true; endswitch This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |