Commit c271b750 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi

depending on the new repository from Tischi for Embryo alignment

parent 4c3acdb9
......@@ -15,7 +15,7 @@
<groupId>embl.almf</groupId>
<version>1.0.2-SNAPSHOT</version>
<version>1.0.3-SNAPSHOT</version>
<name>Fly_Embryo_Feedback</name>
<inceptionYear>2017</inceptionYear>
......@@ -93,8 +93,8 @@
<dependency>
<groupId>de.embl.cba</groupId>
<artifactId>fiji-plugin-morphometry</artifactId>
<version>0.4.05</version>
<artifactId>fly-reg</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
......
......@@ -10,10 +10,9 @@ import automic.online.jobs.Job_Default;
import automic.parameters.ParameterCollection;
import automic.parameters.ParameterType;
import automic.table.TableModel;
import de.embl.cba.morphometry.ImageIO;
import de.embl.cba.flyreg.FlyEmbryoRegistrationSettings;
import de.embl.cba.flyreg.FlyEmbryoSingleChannelRegistration;
import de.embl.cba.morphometry.Utils;
import de.embl.cba.morphometry.drosophila.registration.DrosophilaRegistrationSettings;
import de.embl.cba.morphometry.drosophila.registration.DrosophilaSingleChannelRegistration;
import ij.IJ;
import net.imagej.ImageJ;
import ij.ImagePlus;
......@@ -142,32 +141,17 @@ public class Job_FocusEmbryoAutoDatasetSplit extends Job_Default{
}
private < T extends RealType< T > & NativeType< T > >
void getEllipsoidParameters(ImagePlus _image)throws Exception {
final DrosophilaRegistrationSettings settings =
new DrosophilaRegistrationSettings();
settings.onlyComputeEllipsoidParameters = true;
//double w=img.getCalibration().pixelWidth/settings.registrationResolution;
//double h=img.getCalibration().pixelHeight/settings.registrationResolution;
//double d=img.getCalibration().pixelDepth/settings.registrationResolution;
RandomAccessibleInterval< T > images =
ImageIO.getChannelImages( _image );
RandomAccessibleInterval< T > image =
ImageIO.getChannelImage( images, 0 );
final FlyEmbryoRegistrationSettings settings = new FlyEmbryoRegistrationSettings();
settings.onlyComputeEllipsoidParameters = true;
final DrosophilaSingleChannelRegistration registration = new DrosophilaSingleChannelRegistration( settings, opService );
final FlyEmbryoSingleChannelRegistration registration = new FlyEmbryoSingleChannelRegistration( settings, opService );
final double[] calibration = Utils.getCalibration( _image );
registration.run( image, calibration );
registration.run( _image,0);
final double[] centre = registration.getElliposidCentreInInputImagePixelUnits();
final double[] angles = registration.getElliposidEulerAnglesInDegrees();
......@@ -176,6 +160,7 @@ public class Job_FocusEmbryoAutoDatasetSplit extends Job_Default{
selectedYPosition = centre[1];
selectedZPosition = centre[2];
rotation=-angles[0];
}
......@@ -282,7 +267,7 @@ public class Job_FocusEmbryoAutoDatasetSplit extends Job_Default{
// start ImageJ
new ImageJ().ui().showUI();
String tblPth="X:\\group\\ALMFstuff\\Aliaksandr\\User_data\\Crocker-fly-feedback\\03082019_march_test";
String tblPth="X:\\group\\Aliaksandr\\User_data\\Crocker-fly-feedback\\03082019_march_test";
String tblFnm="summary_test03_.txt";
Job_FocusEmbryoAutoDatasetSplit testJob=new Job_FocusEmbryoAutoDatasetSplit();
testJob.initialise(null, "Focus.Image", false);
......
......@@ -4,19 +4,14 @@ package algorithm.tests;
import java.io.File;
import de.embl.cba.morphometry.ImageIO;
import de.embl.cba.morphometry.Logger;
import de.embl.cba.flyreg.FlyEmbryoRegistrationSettings;
import de.embl.cba.flyreg.FlyEmbryoSingleChannelRegistration;
import de.embl.cba.morphometry.Utils;
import de.embl.cba.morphometry.drosophila.registration.DrosophilaRegistrationSettings;
import de.embl.cba.morphometry.drosophila.registration.DrosophilaSingleChannelRegistration;
import de.embl.cba.morphometry.geometry.ellipsoids.EllipsoidMLJ;
import de.embl.cba.morphometry.geometry.ellipsoids.EllipsoidsMLJ;
import ij.ImagePlus;
import loci.plugins.BF;
import net.imagej.ImageJ;
import net.imagej.ops.OpService;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.realtransform.AffineTransform3D;
import net.imglib2.type.NativeType;
import net.imglib2.type.numeric.RealType;
......@@ -35,21 +30,16 @@ public class FindEmbryoOrientationTischi {
final ImagePlus imagePlus = BF.openImagePlus(inputPath)[0];
imagePlus.show();
final DrosophilaRegistrationSettings settings =
new DrosophilaRegistrationSettings();
final FlyEmbryoRegistrationSettings settings = new FlyEmbryoRegistrationSettings();
settings.onlyComputeEllipsoidParameters = true;
RandomAccessibleInterval< T > images =
ImageIO.getChannelImages( imagePlus );
RandomAccessibleInterval< T > image =
ImageIO.getChannelImage( images, 0 );
final DrosophilaSingleChannelRegistration registration = new DrosophilaSingleChannelRegistration( settings, opService );
final FlyEmbryoSingleChannelRegistration registration = new FlyEmbryoSingleChannelRegistration( settings, opService );
final double[] calibration = Utils.getCalibration( imagePlus );
registration.run( image, calibration );
registration.run(imagePlus, 0);
final double[] centre = registration.getElliposidCentreInInputImagePixelUnits();
final double[] angles = registration.getElliposidEulerAnglesInDegrees();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment