J'essaie d'ajouter une barre d'échelle à ImagePlus mais je ne peux pas. Quand j'utilisais windows je les commandes suivantes:ImageJ, ajout d'une barre d'échelle à ImagePlus
IJ.selectWindow("window_name");
IJ.run("Set Scale...", "distance=1 known="+pixelSize+" pixel=1 unit=um");
IJ.run("Scale Bar...", "width="+barSize+" height=3 font=12 color=Black location=[Upper Right]");
J'espère que quelqu'un peut me aider, je laisse le code à voir:
String name = "example.jpg";
ImagePlus cRoiDuplicated = this.cROI.duplicate();
cRoiDuplicated.setTitle(name);
if (barSize != -1){
[Code]
/*IJ.run("Set Scale...", "distance=1 known="+pixelSize+" pixel=1 unit=um");
IJ.run("Scale Bar...", "width="+barSize+" height=3 font=12 color=Black location=[Upper Right]");*/
}
FileSaver fs = new FileSaver(cRoiDuplicated);
fs.saveAsJpeg(this.directory + name);
cRoiDuplicated.close();
Merci, vous avez été très utile. Je viens de tester et ça marche. – SolidusAbi