[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: images
From: |
John W. Eaton |
Subject: |
Re: images |
Date: |
Thu, 15 Feb 2007 04:49:00 -0500 |
On 9-Feb-2007, Daniel J Sebald wrote:
| The attached patch should be a step in the right direction. The
| file diffs were created separately rather than recursively.
OK, I applied the patch with some changes (see below).
| If I missed a file, let me know.
What about imagesc.m? Can parts of that be replaced by a call to __img__?
| + s.cdata = img;
| + s.lims = [xlim ylim];
I appears that Matlab uses xdata and ydata for this, so I replace lims
with those fields.
| --- image/colormap.m 2007-02-08 11:50:52.000000000 -0600
| +++ /home/sebald/octave/colormap.m 2007-02-09 04:25:16.561543488 -0600
| @@ -61,12 +61,12 @@
| error ("colormap: map must have values in [0,1]");
| endif
| ## Set the new color map
| - set (gcf (), "colormap", map);
| + set (gca (), "colormap", map);
| endif
|
| endif
|
| ## Return current color map.
| - cmap = get (gcf (), "colormap");
| + cmap = get (gca (), "colormap");
| --- plot/__uiobject_axes_ctor__.m 2007-02-08 11:50:56.000000000 -0600
| +++ /home/sebald/octave/__uiobject_axes_ctor__.m 2007-02-09
02:30:20.000000000 -0600
| @@ -32,6 +32,7 @@
| s.parent = p;
| s.children = [];
| s.position = [];
| + s.colormap = __default_colormap__ ();
|
| h = __uiobject_make_handle__ (s);
|
Matlab stores the colormap in the figure object, not the axes object,
so I did not apply these changes, and I made a small change in
__uiobject_draw_axes__ to get the colormap from the figure object that
is the parent of the current axes.
| + fwrite (fid, [img_data(:,:,1)(:) img_data(:,:,2)(:)
img_data(:,:,3)(:)]'(:), "float");
I think the reordering of img_data can be expressed as
permute (img_data, [3, 1, 2])(:)
so I used this expression instead.
Thanks,
jwe
- Re: 2.9.10, finally?, (continued)
- Re: 2.9.10, finally?, Daniel J Sebald, 2007/02/08
- images, Daniel J Sebald, 2007/02/08
- images, John W. Eaton, 2007/02/09
- Re: images, Shai Ayal, 2007/02/09
- Re: images, John W. Eaton, 2007/02/09
- Re: images, Shai Ayal, 2007/02/09
- Re: images, Daniel J Sebald, 2007/02/09
- Re: images, Daniel J Sebald, 2007/02/09
- Re: images, Daniel J Sebald, 2007/02/09
- Re: images, John W. Eaton, 2007/02/15
- Re: images,
John W. Eaton <=
- Re: images, Daniel J Sebald, 2007/02/15
- Re: 2.9.10, finally?, John W. Eaton, 2007/02/08
- Re: 2.9.10, finally?, Daniel J Sebald, 2007/02/09