alchemymetalworks@gmail.com writes:
> -if the value is the same in all the maps, keep that value in the final output map
I wouldn't both with this. I think what you do below will solve this
problem anyway, and this just adds complications.
> -if a pixel meets several of these criteria (for example, pixel P
> is value 1 in map 1 and value 10 in map 3)I want to designate
> which map should take priority.
I don't know what this means either. I think you are already making
choices, so I don't know what other choices you would want to make. I'd
leave it until you did everything else, then see if there are problem
areas that need more attention.
> -if the value is 1, 2, 4-9, or 13 use the pixels with that value from map 1
> -if the value is 3, 8, 12, 14, or 15 use the pixels with that value from map 2
> -if the value is 10 use the pixels with that value from map 3
> -if the value is 11 use the pixels with that value from map 4
I am going to assume the images are name i1-i4, for simplicity. We will
call the final image "f". Here is how I would construct a composite
image.
f = i1 * 0
void = Histogram(i1,binsize=1,min=0,max=15, reverse_indices=ri1)
void = Histogram(i2,binsize=1,min=0,max=15, reverse_indices=ri2)
void = Histogram(i3,binsize=1,min=0,max=15, reverse_indices=ri3)
void = Histogram(i4,binsize=1,min=0,max=15, reverse_indices=ri4)
indices = cgReverseIndices(ri1,1)
f[indices] = i1[indices]
indices = cgReverseIndices(ri1,2)
f[indices] = i1[indices]
indices = cgReverseIndices(ri2,3)
f[indices] = i2[indices]
indices = cgReverseIndices(ri1,4)
f[indices] = i1[indices]
indices = cgReverseIndices(ri1,5)
f[indices] = i1[indices]
indices = cgReverseIndices(ri1,6)
f[indices] = i1[indices]
indices = cgReverseIndices(ri1,7)
f[indices] = i1[indices]
indices = cgReverseIndices(ri2,8)
f[indices] = i2[indices]
indices = cgReverseIndices(ri1,9)
f[indices] = i1[indices]
indices = cgReverseIndices(ri3,10)
f[indices] = i3[indices]
indices = cgReverseIndices(ri4,11)
f[indices] = i4[indices]
indices = cgReverseIndices(ri2,12)
f[indices] = i2[indices]
indices = cgReverseIndices(ri1,13)
f[indices] = i1[indices]
indices = cgReverseIndices(ri2,14)
f[indices] = i2[indices]
indices = cgReverseIndices(ri2,15)
f[indices] = i2[indices]
Then, I would look to see if there were any holes and decide what to do
next. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|