From 950671444223547ee78d04b68ce9943ea94a6404 Mon Sep 17 00:00:00 2001
From: Amandine Tournay <amandine.tournay@pasteur.fr>
Date: Tue, 9 Mar 2021 19:11:32 +0100
Subject: [PATCH] Added project

---
 .gitignore                                    |   6 +
 StackRotation.jar                             | Bin 0 -> 4275 bytes
 export.jardesc                                |  16 ++
 pom.xml                                       |  89 ++++++++++
 .../spop/rotation3D/StackRotation.class       | Bin 0 -> 4632 bytes
 .../spop/rotation3D/StackRotation.java        | 168 ++++++++++++++++++
 6 files changed, 279 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 StackRotation.jar
 create mode 100644 export.jardesc
 create mode 100644 pom.xml
 create mode 100644 src/main/java/plugins/spop/rotation3D/StackRotation.class
 create mode 100644 src/main/java/plugins/spop/rotation3D/StackRotation.java

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3d47f98
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+.idea/
+target/
+.settings/
+*.iml
+.project
+.classpath
\ No newline at end of file
diff --git a/StackRotation.jar b/StackRotation.jar
new file mode 100644
index 0000000000000000000000000000000000000000..a18d426e7d854c66773851fa79c5c553782d1ead
GIT binary patch
literal 4275
zcma)9cTiLN){P<bCLIKWNRuudB}haFU<|#5A|OF}5d@JYJqm=Tw1`NTF1;v-iu5KC
zFakp8TzU^pcyRCcJ@wAqJ8zviGy9y`d;Q8EYu3_%lYp236ciMIf`AAez%O71fB*<J
zgX?0NS}+O3buCSpn!bTJ0(R610Bj<<yKce7#QSOCV#2-MeU*Bb2c!uzlQTeo4xF5#
z;t_C#^Ms1y<kdM@fC>Ph006LmTj1muz}?x)&cW4F;-9-{f9djccXR)jR`$QQdbr)U
zzVG1XDy{nG)L-ZP`!+=WWlI0PwT+YB|FMYMI9q#qzA$z$Ft_6fymmK2vD=(cr4Ge|
za%nE(V|t8Zuc+YDQVe5m2Rb}AkKjx}u}XQO0p69lQEv;3n9Pa>Ob6b`V4=>=3Bx&#
zBiYJT>apPM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B#<fw)0GeP(jTA92Fo
z0|kMOQIy_`StF$+W<ji^@{Wi<g2TaU?5)rdOPSo9w<!4N5l?=xYH6`@O=8h_(JJQf
z5w4wcypsq!!pM8%qlcXE$M<;MjuK(FpVN&6!ZC-E=Ph2cX~OQUykK4R>b@n^QI@ek
zj&48Nyb}{|T<7z#<G@Pgd<yTJi7<PF9UhJ)S4wXMwv)fLja?vb>Rz97i1CuEGWW}P
z6HE9p|EKb3dmMyc1OWh_nNF4G43HV{Gw}YJR8Ir%@A#+qd&)uu_~%snlg0WMJ^Qz*
z)0F!Y=#%m{75ul+)71MD6({9yqrV8~uZKTP!M{rKX$t;{`IGXWSbmq`KQr;K#HWh>
k>y4i(`cHVBT-yIee5&s{a8k0<S+bL-^b7#7N_YD8AKiy)dH?_b

literal 0
HcmV?d00001

diff --git a/export.jardesc b/export.jardesc
new file mode 100644
index 0000000..7f140a2
--- /dev/null
+++ b/export.jardesc
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
+<jardesc>
+    <jar path="Stack Rotation/StackRotation.jar"/>
+    <options buildIfNeeded="true" compress="true" descriptionLocation="/Stack Rotation/export.jardesc" exportErrors="false" exportWarnings="true" includeDirectoryEntries="true" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
+    <storedRefactorings deprecationInfo="true" structuralOnly="false"/>
+    <selectedProjects/>
+    <manifest generateManifest="true" manifestLocation="/Icy-Updater/META-INF/MANIFEST.MF" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
+        <sealing sealJar="false">
+            <packagesToSeal/>
+            <packagesToUnSeal/>
+        </sealing>
+    </manifest>
+    <selectedElements exportClassFiles="true" exportJavaFiles="true" exportOutputFolder="false">
+        <javaElement handleIdentifier="=Stack Rotation/src"/>
+    </selectedElements>
+</jardesc>
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..1f96c1e
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <!-- Inherited Icy Parent POM -->
+    <parent>
+        <groupId>org.bioimageanalysis.icy</groupId>
+        <artifactId>parent-pom-plugin</artifactId>
+        <version>1.0.3</version>
+    </parent>
+
+    <!-- Project Information -->
+    <artifactId>stack-rotation</artifactId>
+    <version>1.2.1</version>
+
+    <packaging>jar</packaging>
+
+    <name>Stack Rotation</name>
+    <description>Rotate the 3D stack from Front view to Right view or from Front view to Top view. </description>
+    <url></url>
+    <inceptionYear>2020</inceptionYear>
+
+    <organization>
+        <name>Institut Pasteur</name>
+        <url>https://pasteur.fr</url>
+    </organization>
+
+    <licenses>
+        <license>
+            <name>GNU GPLv3</name>
+            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+
+    <developers>
+        <developer>
+            <id>sdallongeville</id>
+            <name>Stéphane Dallongeville</name>
+            <url>https://research.pasteur.fr/fr/member/stephane-dallongeville/</url>
+            <roles>
+                <role>founder</role>
+                <role>lead</role>
+                <role>architect</role>
+                <role>developer</role>
+                <role>debugger</role>
+                <role>tester</role>
+                <role>maintainer</role>
+                <role>support</role>
+            </roles>
+        </developer>
+    </developers>
+
+    <!-- Project properties -->
+    <properties>
+
+    </properties>
+
+    <!-- Project build configuration -->
+    <build>
+
+    </build>
+
+    <!-- List of project's dependencies -->
+    <dependencies>
+        <!-- The core of Icy -->
+        <dependency>
+            <groupId>org.bioimageanalysis.icy</groupId>
+            <artifactId>icy-kernel</artifactId>
+        </dependency>
+
+        <!-- The EzPlug library, simplifies writing UI for Icy plugins. -->
+        <dependency>
+            <groupId>org.bioimageanalysis.icy</groupId>
+            <artifactId>ezplug</artifactId>
+        </dependency>
+    </dependencies>
+
+    <!-- Icy Maven repository (to find parent POM) -->
+    <repositories>
+        <repository>
+            <id>icy</id>
+            <name>Icy's Nexus</name>
+            <url>https://icy-nexus.pasteur.fr/repository/Icy/</url>
+        </repository>
+    </repositories>
+</project>
\ No newline at end of file
diff --git a/src/main/java/plugins/spop/rotation3D/StackRotation.class b/src/main/java/plugins/spop/rotation3D/StackRotation.class
new file mode 100644
index 0000000000000000000000000000000000000000..68074344ee33ae06c785a18f06198858479a547b
GIT binary patch
literal 4632
zcmbVPX>?R)8GgRZOzvdn29l5)mJrsKEChz6nj&G%0#2I%O~Mk=0ymROGB8V+xf7Du
z*4n0vYo%HRTdS$HQR~twBv>p^3su`5{h>X2^r%Pu)zhPYsz1tU8=vpaotp^++C!52
zt?&1)&-cDxUi;w1a{z9^8wzp+Ztjnydc(0~AlV=94<zEIZieHrTbcsxrXD)dX3rJ4
z1<Ep{dQa+5Je3F-!*V6iJiL>gf?R>6SCVu`;-MqSKtzxA1{&m8z!Q%3r%ZtrEmsmd
z{C4Y!cH?Nuh=q)L0k=8SZwM^AE`5hFXp%NJo-!@&x$DERu(?sdRZ+Q{JR0LYh7T?j
zs8Erwph)1Rk0RfTVyYaJD*I4~5_x>CfL76RSRc^ShP9iCaICk!a(5mC=BrTPRZuFh
z<az?6!d{e7wGNu6V6i~Kl`OqjDxhvn#A9Yhye-_@#}ms1eD+F5yx)hLQLbQxK;hKk
zhIl+;=rI))s1#5J^hnCsaY&$~VqayJ+BR9e4-2qT+Ep!3KZ9LeS!ZlhvsN-(($=q5
zkq4g_YZ!_hRw$%TYE}5*6`0);jv3oi(QYHrp?60Z)S{MnNRKeyVL7)K-DY1nDNybN
z{JPj=)O|A6VLcKawqpDV73;v|S$a=T^KfH4+8>V@F+#4q!eMz8h8;4-Q37RyijCMr
zCP~BW2uF>kaI!z54>4Z!A`zt+gGMN2QeYt(R5YSVz}st>yQQ}!K&JV6NB3bPWY#O#
z%B^r{D3G-A9moLPh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PhbX<5?R_}Gew3r<xPFSX=ZKJ3h>bV#F#du^@D}@b_)L3`PdE=uF`G}Y
zB0Oqkr8G*59h4S1DD^og^<+?rNe89xIw*a|LFvC8l>Wm(>F*tszV4vZbWnP$gVJ&v
zrEfYY{nHJjv@9E?b2BKF)p6XZ9xIt6h;N9g5|nE#Jf2l{gj04Va3&3JCWRdS0&`c&
zx-*WSkK-jdWSx11!zp&NtbG3j@7t5ColjY8OVUSewq$}=@hdVG__ZUT$rhkWt~F@^
cQ(S!(hiAz3*({E#!%@X=Y>ux{$sD}?f9@|`>;M1&

literal 0
HcmV?d00001

diff --git a/src/main/java/plugins/spop/rotation3D/StackRotation.java b/src/main/java/plugins/spop/rotation3D/StackRotation.java
new file mode 100644
index 0000000..95aa806
--- /dev/null
+++ b/src/main/java/plugins/spop/rotation3D/StackRotation.java
@@ -0,0 +1,168 @@
+package plugins.spop.rotation3D;
+
+import icy.image.IcyBufferedImage;
+import icy.sequence.Sequence;
+import icy.type.collection.array.Array1DUtil;
+import icy.util.OMEUtil;
+import plugins.adufour.blocks.lang.Block;
+import plugins.adufour.blocks.util.VarList;
+import plugins.adufour.ezplug.EzPlug;
+import plugins.adufour.ezplug.EzVarSequence;
+import plugins.adufour.ezplug.EzVarText;
+
+public class StackRotation extends EzPlug implements Block
+{
+    
+    EzVarSequence input  = new EzVarSequence("Input");
+    EzVarText     type   = new EzVarText("Type", new String[] { "FrontToRight", "FrontToTop" }, false);
+    // VarSequence output = new VarSequence("Output", false);
+    
+    EzVarSequence output = new EzVarSequence("Output");
+    
+    @Override
+    public void initialize()
+    {
+        // TODO Auto-generated method stub
+        super.addEzComponent(input);
+        super.addEzComponent(type);
+        // super.addOutput(output);
+        super.setTimeDisplay(true);
+        
+    }
+    
+    @Override
+    public void execute()
+    {
+        
+        Sequence sequence = input.getValue(true);
+        Sequence seq_out = new Sequence(OMEUtil.createOMEXMLMetadata(sequence.getOMEXMLMetadata()));
+        if (type.getValue().equalsIgnoreCase("FrontToRight"))
+        {
+            seq_out = FrontToRight(sequence);
+            seq_out.setName("FrontToRight");
+        }
+        if (type.getValue().equalsIgnoreCase("FrontToTop"))
+        {
+            seq_out = FrontToTop(sequence);
+            seq_out.setName("FrontToTop");
+            
+        }
+        
+        if (getUI() != null) addSequence(seq_out);
+        output.setValue(seq_out);
+        
+    }
+    
+    public static Sequence FrontToRight(Sequence sequence)
+    {
+        
+        int z = 0;
+        
+        Sequence seq = new Sequence();
+        
+        int dim_x = sequence.getSizeX();
+        int dim_y = sequence.getSizeY();
+        int dim_z = sequence.getSizeZ();
+        int dim_t = sequence.getSizeT();
+        int dim_c = sequence.getSizeC();
+        double[][] tab = new double[dim_z][dim_x * dim_y];
+        double[][][] tab_r = new double[dim_c][dim_x][dim_y * dim_z];
+        
+        for (int t = 0; t < dim_t; t++)
+        {
+            for (int c = 0; c < dim_c; c++)
+            {
+                for (z = 0; z < dim_z; z++)
+                {
+                    tab[z] = Array1DUtil.arrayToDoubleArray(sequence.getDataXY(t, z, c), false);
+                }
+                for (z = 0; z < dim_z; z++)
+                    for (int y = 0; y < dim_y; y++)
+                        for (int x = 0; x < dim_x; x++)
+                        {
+                            tab_r[c][x][y * dim_z + z] = tab[z][y * dim_x + x];
+                        }
+            }
+            
+            for (z = 0; z < dim_x; z++)
+            {
+                IcyBufferedImage Icy = new IcyBufferedImage(dim_z, dim_y, dim_c, sequence.getDataType());
+                for (int c = 0; c < dim_c; c++)
+                    Icy.setDataXY(c, tab_r[c][z]);
+                seq.setImage(t, z, Icy);
+            }
+        }
+        
+        System.gc();
+        return seq;
+        
+    }
+    
+    public static Sequence FrontToTop(Sequence sequence)
+    {
+        
+        int z = 0;
+        
+        Sequence seq = new Sequence();
+        
+        int dim_x = sequence.getSizeX();
+        int dim_y = sequence.getSizeY();
+        int dim_z = sequence.getSizeZ();
+        int dim_t = sequence.getSizeT();
+        int dim_c = sequence.getSizeC();
+        double[][] tab = new double[dim_z][dim_x * dim_y];
+        double[][][] tab_r = new double[dim_c][dim_y][dim_x * dim_z];
+        
+        for (int t = 0; t < dim_t; t++)
+        {
+            for (int c = 0; c < dim_c; c++)
+            {
+                for (z = 0; z < dim_z; z++)
+                {
+                    tab[z] = Array1DUtil.arrayToDoubleArray(sequence.getDataXY(t, z, c), false);
+                }
+                for (z = 0; z < dim_z; z++)
+                    for (int y = 0; y < dim_y; y++)
+                        for (int x = 0; x < dim_x; x++)
+                        {
+                            tab_r[c][y][z * dim_x + x] = tab[z][y * dim_x + x];
+                        }
+            }
+            
+            for (z = 0; z < dim_y; z++)
+            {
+                IcyBufferedImage Icy = new IcyBufferedImage(dim_x, dim_z, dim_c, sequence.getDataType());
+                for (int c = 0; c < dim_c; c++)
+                    Icy.setDataXY(c, tab_r[c][z]);
+                seq.setImage(t, z, Icy);
+            }
+        }
+        
+        System.gc();
+        
+        return seq;
+        
+    }
+    
+    public void clean()
+    {
+    }
+    
+    @Override
+    public void declareInput(VarList inputMap)
+    {
+        // TODO Auto-generated method stub
+        inputMap.add(input.getVariable());
+        inputMap.add(type.getVariable());
+        
+    }
+    
+    @Override
+    public void declareOutput(VarList outputMap)
+    {
+        // TODO Auto-generated method stub
+        outputMap.add(output.getVariable());
+        
+    }
+    
+}
-- 
GitLab