Skip to content

Commit e818377

Browse files
Exporter: fix typo when setting Channel.SamplesPerPixel
This caused a problem when exporting DICOM with multiple channels from ImageJ, as the DICOM writer strictly requires non-null SamplesPerPixel on every Channel.
1 parent 678fd01 commit e818377

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/bio-formats-plugins/src/loci/plugins/out/Exporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ else if (FormatTools.isSigned(originalType)) {
505505
String lsid = MetadataTools.createLSID("Channel", 0, c);
506506
store.setChannelID(lsid, 0, c);
507507
}
508-
store.setChannelSamplesPerPixel(new PositiveInteger(channels), 0, 0);
508+
store.setChannelSamplesPerPixel(new PositiveInteger(channels), 0, c);
509509

510510
if (imp instanceof CompositeImage) {
511511
luts[c] = ((CompositeImage) imp).getChannelLut(c + 1);

0 commit comments

Comments
 (0)