Thanks Tim, I tried to look into the code of Overlay but it wasn't to clear 
to me. In particular I am missing where the RGB(A) data is combined. Is it 
really as simple as adding the individual RGB values and preventing 
overflow by clamp?
Or is there some infrastructure for color mixing in Colors.jl

I further looked for functions for gray value mapping (Contrast/Brightness) 
in Colors.jl but could not find anything. This is of course not complicated 
to code but I don't want to miss an existing solution.

Tobi

Am Donnerstag, 12. November 2015 16:42:00 UTC+1 schrieb Tim Holy:
>
> Probably the easiest thing would be to just extend the code in Images and 
> submit a PR (the code is not very complicated). 
>
> However, you can do very fancy things with MapInfo objects. This is 
> untested, 
> but it should be close: 
>
> immutable TwoColormap <: MapInfo 
>     colormap1 
>     colormap2 
> end 
>
> function map!(dest, mapi::TwoColormap, 
> src::Tuple{AbstractArray,AbstractArray}) 
>     img1, img2 = src 
>     for I in eachindex(dest) 
>         dest[I] = clamp(RGBmapi.colormap1[img1[I]] + 
> mapi.colormap2[img2[I]]) 
>     end 
>     dest 
> end 
>
> --Tim 
>
> On Thursday, November 12, 2015 07:23:07 AM Tobias Knopp wrote: 
> > Hi, 
> > 
> > I am using the OverlayImage type from the Images.jl package to overlay 
> two 
> > different grayscale images (tomographic data). 
> > If I understand it correctly OverlayImage is restricted to colormaps 
> that 
> > go from black to a certain RGB value. Has anybody an idea how this could 
> be 
> > extended to Colormaps provided by Colors.jl? 
> > 
> > So my need is: 
> > Input: two 3D datasets (FloatingPoint) + two Colormaps + WindowWidth 
> > WindowLevel for each 
> > Output: Combined 3D dataset as RGBA values. 
> > 
> > Thanks 
> > 
> > Tobias 
>
>

Reply via email to