octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.9.10, finally?


From: John W. Eaton
Subject: Re: 2.9.10, finally?
Date: Thu, 8 Feb 2007 18:55:52 -0500

On  8-Feb-2007, Daniel J Sebald wrote:

| Søren Hauberg wrote:
| 
| > So thinking in terms of graphics properties I would guess that we, for 
| > image data, should have a colormap property. This property should 
| > default to an empty property in which case the "raw" data should be 
| > shown, i.e. gray-scale images for 2D matrices, and RGB for 3D matrices. 
| > If the user calls the colormap function the property should be set, the 
| > colormap applied, and the figure should be updated.
| > 
| > Was that the question you were asking?
| 
| Your summary sounds correct.  Let's begin by addressing the information that 
must be retained in order to fully implement.
| 
| Inside image.m is the creation of the information:
| 
|   s = __uiobject_image_ctor__ (ca);
| 
|   s.cdata = img;
| 
| [snip]
| 
|   xlim = [x(1), x(end)];
|   ylim = [y(1), y(end)];
| 
|   set (ca, "view", [0, 90], "xlim", xlim, "ylim", ylim);
| 
| There really should be more to this, in my opinion.  The image itself should 
have information about where it is positioned.  So, what is being computed 
here, xlim and ylim, really pertain to the image.  Yes, by default the current 
plot view can be adjusted to fit that, but really it doesn't have to be.
| 
| So, this xlim and ylim should be stored as part of s.cdata.
| 
| (Note, the issue I raised previously about the fractional pixels would be 
adjusted by choosing xlim and ylim accordingly... easy fix.)
| 
| You also mentioned that the image itself should keep track of its own 
palette.  I think that is logical behavior too.  Unless there is some kind of 
way to specify that the image should use whatever the current palette is.  But 
still, I think it'd be nice for images to have their own palette.
| 
| So, that means s.cdata would also need to contain that information.

For compatibility, s.cdata should only contain the kind of information
that is contained in the corresponding property in the Matlab graphics
system, so that when someone writes

  x = get (h, "cdata")

X will contain the same data in Octave or Matlab.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]