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

FujiReader: ensure getCurrentFile is the first element of the used files list #4267

Merged
merged 4 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
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
15 changes: 6 additions & 9 deletions components/formats-gpl/src/loci/formats/in/FujiReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,14 @@ public void close(boolean fileOnly) throws IOException {
/* @see loci.formats.FormatReader#initFile(String) */
@Override
protected void initFile(String id) throws FormatException, IOException {
super.initFile(id);

if (checkSuffix(id, "inf")) {
infFile = new Location(id).getAbsolutePath();
pixelsFile = infFile.substring(0, infFile.lastIndexOf(".")) + ".img";
}
else {
pixelsFile = new Location(id).getAbsolutePath();
infFile = pixelsFile.substring(0, pixelsFile.lastIndexOf(".")) + ".inf";
if (!checkSuffix(id, "inf")) {
initFile(id.substring(0, id.lastIndexOf(".")) + ".inf");
return;
}

super.initFile(id);
infFile = new Location(id).getAbsolutePath();
pixelsFile = infFile.substring(0, infFile.lastIndexOf(".")) + ".img";
String[] lines = DataTools.readFile(infFile).split("\r{0,1}\n");

int bits = Integer.parseInt(lines[5]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,6 @@ public void testSaneUsedFiles() {
!(reader.getFormat().equals("Evotec Flex")) &&
!(reader.getFormat().equals("CellSens VSI")) &&
!(reader.getFormat().equals("PerkinElmer")) &&
!(reader.getFormat().equals("Fuji LAS 3000")) &&
!(reader.getFormat().equals("Micro-Manager")) &&
!(reader.getFormat().equals("BDV")) &&
!(reader.getFormat().equals("Zeiss AxioVision TIFF")) &&
Expand Down
Loading