Login  Register

Create Hyperstack - Composite Problem

Posted by Greg on Mar 02, 2015; 11:18am
URL: http://imagej.273.s1.nabble.com/Create-Hyperstack-Composite-Problem-tp5011826.html

Hi,

I want to partially open a huge Hyperstack which consists of many frames and 3 color channels.

I do the following:

width = 1004
height = 1002
NFrames = 2
HS = IJ.createHyperStack('PartialStack',width,height,3,1,NFrames,16)
stack = HS.getStack()


orig = IJ.openImage(path+name)
o_stack = orig.getStack()
orig.show()

print o_stack.getSize()
print stack.getSize()
print orig.getDimensions()

for sliceIndex in range(1,2*NFrames +1):
    c = sliceIndex%3
    if c == 0:
        c = 3
    print 'slice ',sliceIndex,c

    ip = o_stack.getProcessor(sliceIndex)
    imp = ImagePlus('channel' + str(c),ip)
    stack.setProcessor(ip,sliceIndex)
    print HS.getCompositeMode()
    print HS.isComposite()

As a results, I get correctly a Hyperstack with the correct dimensions. The Problem is, that the Channels are somehow merged LUT-wise. So when I measure the distinct channels, I think the results are correct, but I see merged Channels (1-3). So we loose the visual information which is bad. I think somehow the LUTs get merged, but I do not know how to control/fix this.

Greets,
Greg