So thanks to some very helpful people I was able to get started on coding this macro.
However I am running into tons of errors (compiling through Fiji).
First here is my code (I have no clue where there error is coming from so I'm posting all of it):
import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
import ij.plugin.frame.*;
public class Test_Plugin implements PlugIn {
private void getFile(String dirPath) {
try {
Files.find(Paths.get(dirPath), 1, (path, basicFileAttributes) -> (path.toFile().getName().contains("DAPI"))).forEach(dapiPath) -> {
Path gfpPath = dapiPath.resolveSibling(dapiPath.getFileName().toString().replace("DAPI", "GFP"));
doSomething(dapiPath, gfpPath);
}
}catch(IOException e){
e.printStackTrace();
}
}
//Dummy method does nothing yet.
private void doSomething(Path dapiPath, Path gfpPath) {
System.out.println(dapiPath.toAbsolutePath().toString());
System.out.println(gfpPath.toAbsolutePath().toString());
}
}
I'm really lost as to where the errors are coming from. I feel like I'm missing a syntax error somewhere but I cannot find it.
I checked the way that the methods are called and it seems fine to me.
Here are the errors it is throwing up: