bioformats
bioformats copied to clipboard
Repeated conditional tests
https://github.com/ome/bioformats/blob/077ed120c9884af6f8cd7932e4156ac910d471b4/components/formats-bsd/src/loci/formats/out/DicomWriter.java#L1869
DimensionOrder order = retrieve.getPixelsDimensionOrder(series);
return sequential && (sizeC == 1 || sizeZ == 1 ||
order == DimensionOrder.XYZCT ||
order == DimensionOrder.XYZTC ||
order == DimensionOrder.XYZTC ||
order == DimensionOrder.XYTZC);
}
Enum DimensionOrder.XYZTC is repeated, was another enum meant like DimensionOrder.XYTCZ ??
Hi @scuniff, thank you for opening the issue, it does indeed seem like the condition has mistakenly been repeated. Out of curiosity are you using some automated tooling to find these issues?
Yes, I use SpotBugs
https://spotbugs.github.io/index.html
I use SpotBugs to find problems and to get myself familiar with the code so I can maybe get more involved. I’ve been using it lately on Bioformats, OMERO , and ImageJ