bugs in imshow for displayrange
David Bateman
David.Bateman at motorola.com
Thu Sep 18 03:24:25 CDT 2008
Kris Thielemans wrote:
> Hi
>
> sorry. correction below...
>
>> I'm using Octave 3.0.1 on Windows and have a problem with
>> imshow that the display range argument is ignored (when using
>> imshow(im, [0,5]) or so)
>>
>> A quick look at the current (?) version at
>> http://velveeta.che.wisc.edu/cgi-bin/hgwebdir.cgi/octave/file/
>>
> 31e86163b752/scripts/image/imshow.m (changeset 8112) seems to show that the
> same problems > still exists.
>
>> There seem to be 2 independent bugs and I think 3 lines need
>> changing (line numbers from the current version)
>>
>> % line 105
>> case "displayrange";
>> % original
>> % displayrange = varargin{narg++};
>> % fix
>> display_range = varargin{narg++};
>>
>>
>> % line 118
>> % original
>> ## Set default display range.
>> % fix
>> ## Set default display range if display_range not set yet
>> if (isempty (display_range))
>> display_range = [min(im(:)), max(im(:))];
>> % original
>> % else
>> % fix
>> elseif (display_range == NA)
>>
>>
>
> this last test doesn't work as NA ~= NA. Instead, the following test would
> do
>
> (length(display_range~=2))
>
> (although this wouldn't catch the case where display_range was set using a
> wrong format, but that would have to be checked in the argument processing
> anyway)
>
>
You can use "isna". Find attached this fix as a changeset credited to you.
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch8537
Url: https://www-old.cae.wisc.edu/pipermail/bug-octave/attachments/20080918/a9394dea/attachment.ksh
More information about the Bug-octave
mailing list