Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More .nd2 fixes #420

Merged
merged 2 commits into from
Mar 20, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion components/bio-formats/src/loci/formats/in/NativeND2Reader.java
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ else if (blockType.startsWith("ImageText")) {

// only accept the Z and T sizes from the text annotations
// if both values were set
if (core[0].sizeZ == 0) {
if (core[0].sizeZ == 0 && getSizeT() != imageOffsets.size()) {
core[0].sizeT = 0;
}

Expand Down Expand Up @@ -1640,6 +1640,15 @@ else if (channelNames.size() < getEffectiveSizeC()) {
for (int i=0; i<getSeriesCount(); i++) {
// link Instrument and Image
store.setImageInstrumentRef(instrumentID, i);

// set the channel color
for (int c=0; c<getEffectiveSizeC(); c++) {
int red = colors[c] & 0xff;
int green = (colors[c] & 0xff00) >> 8;
int blue = (colors[c] & 0xff0000) >> 16;
int alpha = (colors[c] & 0xff000000) >> 24;
store.setChannelColor(new Color(red, green, blue, alpha), i, c);
}
}

// populate Dimensions data
Expand Down