Skip to content
Snippets Groups Projects
Commit c2f71e34 authored by Valentin Debarnot's avatar Valentin Debarnot
Browse files

fixing path?\

parent 4e50fd0d
Branches
No related tags found
No related merge requests found
......@@ -27,8 +27,8 @@ public class EigenPSF_Manager implements PlugIn {
@Override
public void run() {
String pathUtils = EigenPSF_Manager.class.getProtectionDomain().getCodeSource().getLocation().getPath();
int idx = pathUtils.lastIndexOf('/');
pathUtils =pathUtils.substring(0,idx+1) + "EigenPSFExt_Utils/";
int idx = pathUtils.lastIndexOf(File.separator);
pathUtils =pathUtils.substring(0,idx+1) + "EigenPSFExt_Utils"+File.separator;
//File file1 = new File(pathUtils + "LogC.txt");
//File file2 = new File(pathUtils + "LogJava.txt");
try {
......
......@@ -24,15 +24,15 @@ import eigenpsf.stack.ZStack;
public class Params {
// Handle the paths to load basis, should be done with internet link at the end.
public static String[] PathToGitList = {"/home/esoubies/Bureau/","/home/valentin/Documents/", "/Users/dsage/git/"};
//public static String[] PathToGitList = {"/home/esoubies/Bureau/","/home/valentin/Documents/", "/Users/dsage/git/"};
public static int dim = 2; // dimension of the problem
public static int[] psf_visible_width = {17,17,1}; // estimated essential support of the PSF (should be forced to be odd)
public static double factorDiamBack = 2; // factor such that the local background of a bead is estimated on a patch of size factorDiamBack*support
public static double thresholdDetection = 0.5; // threshold parameter in [0,1]
public static String PathToSingularValues ="superresolved_psf_estimation/code/Outputs/Subspaces/Gaussian"+dim+"D_singularvalues.csv";
public static String PathToSbasis ="superresolved_psf_estimation/code/Outputs/Subspaces/Gaussian"+dim+"D_sbasis_scale";
//public static String PathToSingularValues ="superresolved_psf_estimation/code/Outputs/Subspaces/Gaussian"+dim+"D_singularvalues.csv";
//public static String PathToSbasis ="superresolved_psf_estimation/code/Outputs/Subspaces/Gaussian"+dim+"D_sbasis_scale";
public static int Nscale = 3; // number of precomputed scaled basis, set to 1 to compute it automatically
public static int NbasisVectSIFT = 3; // number of basis used to compute vectorial SIFT
......
......@@ -104,7 +104,7 @@ public class Loader {
}*/
public static void searchSIFTBasis(Project project) {
File f = new File(project.pathUtils + "SIFTbasis/");
File f = new File(project.pathUtils + "SIFTbasis"+File.separator);
if (f.exists() && f.isDirectory()) {
project.setStatusSIFTBasis(true);
} else {
......@@ -127,9 +127,9 @@ public class Loader {
}
if (project.isSIFTbasis) {
// TODO : loop over the types of Basis + Menu in the GUI to select which ?
File directory=new File(project.pathUtils + "SIFTbasis/Gaussian/2D");
File directory=new File(project.pathUtils + "SIFTbasis"+File.separator+"Gaussian"+File.separator+"2D");
Params.NbasisVectSIFT_max2D =directory.list().length-1;
directory=new File(project.pathUtils + "SIFTbasis/Gaussian/3D");
directory=new File(project.pathUtils + "SIFTbasis"+File.separator+"Gaussian"+File.separator+"3D");
Params.NbasisVectSIFT_max3D =directory.list().length-1;
}
......
......@@ -56,12 +56,12 @@ public class SIFTDetection extends AbstractDetection {
// Scale space maxima
// load basis
String PathToGit = " ";
for (int k=0; k<Params.PathToGitList.length; k++) {
Path folder = Paths.get(Params.PathToGitList[k]);
if (Files.exists(folder))
PathToGit=Params.PathToGitList[k];
}
//String PathToGit = " ";
//for (int k=0; k<Params.PathToGitList.length; k++) {
// Path folder = Paths.get(Params.PathToGitList[k]);
// if (Files.exists(folder))
// PathToGit=Params.PathToGitList[k];
//}
// -- Old version when trying to do a list of Dict with different scale to avoid recomputing the scales
/*String PathToSingularValues = PathToGit+Params.PathToSingularValues;
List<Dict> listDict= new ArrayList<Dict>();
......@@ -71,8 +71,8 @@ public class SIFTDetection extends AbstractDetection {
listDict.add(sbasis);
}*/
//-----------------
String PathToSingularValues = project.pathUtils + "SIFTbasis/Gaussian/" + Params.dim + "D/singularvalues.csv";
String PathToSbasis = project.pathUtils + "SIFTbasis/Gaussian/" + Params.dim + "D/Elem_";
String PathToSingularValues = project.pathUtils + "SIFTbasis"+File.separator+"Gaussian"+File.separator + Params.dim + "D"+File.separator+"singularvalues.csv";
String PathToSbasis = project.pathUtils + "SIFTbasis"+File.separator+"Gaussian" + File.separator + Params.dim + "D"+File.separator+"Elem_";
Dict sbasis = new Dict(PathToSbasis,PathToSingularValues,Params.dim,Params.NbasisVectSIFT);
// -- Old version when trying to do a list of Dict with different scale to avoid recomputing the scales
......
......@@ -219,7 +219,7 @@ public class ProjectTable extends CustomizedTable implements MouseListener {
setToolTipText(tip);
try {
Image image = new IconLoader().get("/resources/" + text + ".png");
Image image = new IconLoader().get(File.separator+"resources"+File.separator + text + ".png");
Image scaled = image.getScaledInstance(22, 22, Image.SCALE_SMOOTH);
icon = new ImageIcon(scaled);
setIcon(icon);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment