All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.rocsg.fijiyama.testromain.SalmaTransform Maven / Gradle / Ivy

Go to download

Fijiyama : a versatile registration tool for 3D multimodal time-lapse imaging

There is a newer version: 4.5.0
Show newest version
package io.github.rocsg.fijiyama.testromain;
import ij.ImageJ;
import java.io.File;

import ij.IJ;
import ij.ImagePlus;
import ij.plugin.Duplicator;
import io.github.rocsg.fijiyama.common.VitimageUtils;

public class SalmaTransform {

    
    public static void main(String[] args) {
        ImageJ imageJ=new ImageJ();
        System.out.println("SalmaTransform");

        String inputDir="/home/rfernandez/Bureau/Temp/TestSalma/V2/Raw";
        String outputDir="/home/rfernandez/Bureau/Temp/TestSalma/V2/Stack";
        //makeStack(inputDir,outputDir);
        analyzeStack(  inputDir, "/home/rfernandez/Bureau/Temp/TestSalma/V2/Stack/stack_line.tif","/home/rfernandez/Bureau/Temp/TestSalma/V2/Stack/out_data.csv","/home/rfernandez/Bureau/Temp/TestSalma/V2/Stack/out_names.csv");
    }


    public static void makeStack(String inputDir,String outputDir){
        //List images names in inputDir
        File f=new File(inputDir);
        String[]imgNames=f.list();

        //count the number of image, open each image with IJ.openImage and store them into an array
        int n=imgNames.length;
        ImagePlus[]imgArray=new ImagePlus[n];
        for(int i=0;imaxWidth)maxWidth=imgArray[i].getWidth();
            if(imgArray[i].getHeight()>maxHeight)maxHeight=imgArray[i].getHeight();
        }

        //Uncrop each image to fit to this maximum
        for(int i=0;i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy