overlay of images

Should self._alpha_lut always copy the blue segment data

    > (or are you showing what the user would have to do?) I
    > would have guessed that it would default to being always 1
    > (I think that's the intent above but how does one then
    > 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 :slight_smile:

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....

    > Secondly, this example asks for a threshold based on
    > prenormalized data values (i.e., image value of 30). To get
    > what the user wants, the user must either define the alpha
    > map to match the normalized value of 30 or normalize the
    > data to match 30 to the alpha map threshold. It's not so
    > obvious to me how this is best handled. A fancier
    > normalization function that uses data-based thresholds to
    > map to color map thresholds? Otherwise, it may be fairly
    > painful to apply in practice. A convenient way to define a
    > color map based on data values and how the data will be
    > 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

John Hunter wrote:

    > Secondly, this example asks for a threshold based on
    > prenormalized data values (i.e., image value of 30). To get
    > what the user wants, the user must either define the alpha
    > map to match the normalized value of 30 or normalize the
    > data to match 30 to the alpha map threshold. It's not so
    > obvious to me how this is best handled. A fancier
    > normalization function that uses data-based thresholds to
    > map to color map thresholds? Otherwise, it may be fairly
    > painful to apply in practice. A convenient way to define a
    > color map based on data values and how the data will be
    > normalized?

I'll think about these issues -- gotta run now. But they are
orthogonal to having an alpha channel in the colormap, no?

Well, yes and no. Yes in that this can be implemented without
dealing with the issue, no in that it may not be easily used by
just dealing with that. This has come up before and it makes me
think that some tool (I'm thinking about an optional argument to
normalize or something defining a correspondence between a data
value and a normalized value) is needed to address that, and
there are a number of different approaches that could be taken.
I was just wondering if you had any thoughts about the best
way to do that.

Perry