Hi, I use the following code to create an empty hyperstack, and write slice by slice:
The following code works well when aSizeC =2, but not when aSizeC = 1, or > 2 If aSizeC = 1, then the image was black and intensity is all zero. However, ips.getPixels returns correct pixels data.
If aSiceC = 3, only the first and second channel show its color in the composite image. If rendered in colored image, all the channel cannot be seen, but the B&C panel shows correct histogram for each channel.
The ij.jar version is 1.52p,build 34
ips = ij.IJ.createHyperStack(name,aSizeX,aSizeY,aSizeC,aSizeZ,aSizeT,aBitDepth); for iC = 1 : aSizeC for iT = 1 :aSizeT for iZ = 1 : aSizeZ % set slice position ips.setT(iT); ips.setZ(iZ); ips.setC(iC); % get ip ip = ips.getProcessor; % set pixels ip.setPixels(aSliceDataTransfer); ips.updateAndDraw; end end end
This image is 3-channel image in colored view. Although all three channel has histogram in B&C panel, but the image is black and all pixels shows black,
This image is in compisite view, only the 1st and 2nd channel (Red, Green) shows color, but the third channel (Blue) has no histogram, and does not show blue color.
All the three channel has same data, so the merged should be grey.