Commit 940cd517 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

debugging connection to Tischis code

parent 7b070193
......@@ -5,14 +5,14 @@
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>14.0.0</version>
<version>25.0.0</version>
<relativePath />
</parent>
-->
<groupId>embl.almf</groupId>
<version>0.1.2-SNAPSHOT</version>
......@@ -66,22 +66,40 @@
<main-class>com.mycompany.imagej.Process_Pixels</main-class>
<license.licenseName>bsd_2</license.licenseName>
<license.copyrightOwners>My Company, Inc.</license.copyrightOwners>
<enforcer.skip>true</enforcer.skip>
</properties>
<repositories>
<repository>
<id>bintray-tischi-snapshots</id>
<name>bintray</name>
<url>https://dl.bintray.com/tischi/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<!-- <version>1.52k</version> -->
</dependency>
<dependency>
<groupId>embl.almf</groupId>
<artifactId>AutoMicTools_</artifactId>
<version>1.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.embl.cba</groupId>
<artifactId>fiji-plugin-morphometry</artifactId>
<version>0.4.03</version>
</dependency>
</dependencies>
<!--
<dependencyManagement>
<dependencies>
<dependency>
......@@ -89,13 +107,22 @@
<artifactId>AutoMicTools_</artifactId>
<version>1.1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
<version>1.51k</version>
<version>1.52k</version>
</dependency>
<dependency>
<groupId>de.embl.cba</groupId>
<artifactId>fiji-plugin-morphometry</artifactId>
<version>0.4.03</version>
</dependency>
</dependencies>
</dependencyManagement>
-->
<build>
<resources>
......
......@@ -4,14 +4,12 @@ import java.awt.Color;
import java.io.File;
import java.util.concurrent.TimeUnit;
import org.scijava.vecmath.Point3d;
import automic.online.microscope.ZeissKeys;
import automic.online.jobs.Job_Default;
import automic.parameters.ParameterCollection;
import automic.parameters.ParameterType;
import automic.table.TableModel;
import automic.utils.FileUtils;
import automic.utils.roi.ROIManipulator2D;
import ij.IJ;
import ij.ImageJ;
......
package algorithm.tests;
import java.io.File;
import de.embl.cba.morphometry.ImageIO;
import de.embl.cba.morphometry.Logger;
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;
public class FindEmbryoOrientationTischi {
public static < T extends RealType< T > & NativeType< T > >
void main(String[] args) throws Exception{
final ImageJ ij = new ImageJ();
//ij.ui().showUI();
final OpService opService = ij.op();
final String inputPath = "X:\\group\\ALMFstuff\\Aliaksandr\\User_data\\Crocker-fly-feedback\\Test_protocol_update_20181109\\test8_DE_W0002_P0001\\test8_DE_2_W0002_P0001_T0001\\test8_TR1_W0001_P0004\\test8_TR1_1_W0001_P0004_T0001.lsm";
System.out.println(new File(inputPath).exists());
final ImagePlus imagePlus = BF.openImagePlus(inputPath)[0];
final DrosophilaRegistrationSettings settings =
new DrosophilaRegistrationSettings();
settings.onlyComputeEllipsoidParameters = true;
RandomAccessibleInterval< T > images =
ImageIO.getChannelImages( imagePlus );
RandomAccessibleInterval< T > image =
ImageIO.getChannelImage( images, 0 );
final DrosophilaSingleChannelRegistration registration = new DrosophilaSingleChannelRegistration( settings, opService );
final double[] calibration = Utils.getCalibration( imagePlus );
registration.run( image, calibration );
final EllipsoidMLJ ellipsoidParameters = registration.getEllipsoidParameters();
Logger.log( ellipsoidParameters.toString() );
final AffineTransform3D alignmentTransform =EllipsoidsMLJ.createAlignmentTransform( ellipsoidParameters );
}
}
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