|
From: John H. <jdh...@ac...> - 2005-02-10 00:10:50
|
>>>>> "Perry" == Perry Greenfield <pe...@st...> writes:
Perry> Should self._alpha_lut always copy the blue segment data
Perry> (or are you showing what the user would have to do?) I
Perry> would have guessed that it would default to being always 1
Perry> (I think that's the intent above but how does one then
Perry> define it independently outside of the class definition.
Uh, maybe I have the flu. I meant
self._alpha_lut = makeMappingArray(self.N,
self._segmentdata.get('alpha', [1.0, 1.0])
I'm not sure about the [1.0, 1.0] -- that's your job :-)
What I'm trying to say is that we can use the dict get method to
default to the current behavior if the alpha channel is not defined in
the segmentdata....
Perry> Secondly, this example asks for a threshold based on
Perry> prenormalized data values (i.e., image value of 30). To get
Perry> what the user wants, the user must either define the alpha
Perry> map to match the normalized value of 30 or normalize the
Perry> data to match 30 to the alpha map threshold. It's not so
Perry> obvious to me how this is best handled. A fancier
Perry> normalization function that uses data-based thresholds to
Perry> map to color map thresholds? Otherwise, it may be fairly
Perry> painful to apply in practice. A convenient way to define a
Perry> color map based on data values and how the data will be
Perry> normalized?
I'll think about these issues -- gotta run now. But they are
orthogonal to having an alpha channel in the colormap, no?
Cheers -- hope you're feeling better!
JDH
|