Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
throws FormatException, IOException
{
FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h);
Arrays.fill(buf, getFillColor());

if (getCoreIndex() < core.size() - 1 && getCoreIndex() < rows.size()) {
int tileRows = rows.get(getCoreIndex());
Expand All @@ -544,6 +545,9 @@ public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
int outputRowLen = w * pixel;

Pyramid pyramid = getCurrentPyramid();
if (pyramid.fillColor != null) {
Arrays.fill(buf, pyramid.fillColor);
}

for (int row=0; row<tileRows; row++) {
for (int col=0; col<tileCols; col++) {
Expand Down Expand Up @@ -1957,6 +1961,9 @@ else if (tag == GREEN_OFFSET) {
else if (tag == BLUE_OFFSET) {
pyramid.blueOffset = DataTools.parseDouble(value);
}
else if (tag == DEFAULT_BACKGROUND_COLOR) {
pyramid.fillColor = Byte.parseByte(value);
}
else if (tag == VALUE) {
if (tagPrefix.equals("Channel Wavelength ")) {
pyramid.channelWavelengths.add(DataTools.parseDouble(value));
Expand Down Expand Up @@ -2664,6 +2671,7 @@ class Pyramid {
public Double redOffset;
public Double greenOffset;
public Double blueOffset;
public Byte fillColor;

public ArrayList<String> channelNames = new ArrayList<String>();
public ArrayList<Double> channelWavelengths = new ArrayList<Double>();
Expand Down
Loading