diff --git a/.gitignore b/.gitignore
index 3d47f986c41db29ec6dc0d5036bf760b3a1cf366..57f16fb67c1b1589981416b323d7a9debc728665 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,41 @@
-.idea/
+/build*
+/workspace
+setting.xml
+release/
 target/
-.settings/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+icy.log
+
+### IntelliJ IDEA ###
+.idea/
+*.iws
 *.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
 .project
-.classpath
\ No newline at end of file
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+**/.DS_Store
+Icon?
\ No newline at end of file
diff --git a/StackRotation.jar b/StackRotation.jar
deleted file mode 100644
index a18d426e7d854c66773851fa79c5c553782d1ead..0000000000000000000000000000000000000000
Binary files a/StackRotation.jar and /dev/null differ
diff --git a/export.jardesc b/export.jardesc
deleted file mode 100644
index 7f140a23fb28e5f402edc80ac0380620c06e9cd3..0000000000000000000000000000000000000000
--- a/export.jardesc
+++ /dev/null
@@ -1,16 +0,0 @@
-<?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
index 0f93d488ae88718bc587dbf52cbc7427a2adcd8c..b3da94289a87ff7c4f4df1623245c8e573f6a41a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,20 +6,17 @@
 
     <!-- Inherited Icy Parent POM -->
     <parent>
-		<artifactId>pom-icy</artifactId>
+        <artifactId>pom-icy</artifactId>
         <groupId>org.bioimageanalysis.icy</groupId>
-        <version>2.0.0</version>
-	</parent>
+        <version>3.0.0-a.1</version>
+    </parent>
 
     <!-- Project Information -->
     <artifactId>stack-rotation</artifactId>
-    <version>1.2.1</version>
-
-    <packaging>jar</packaging>
+    <version>2.0.0-a.1</version>
 
     <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>
+    <description>Rotate the 3D stack from Front view to Right view or from Front view to Top view.</description>
     <inceptionYear>2020</inceptionYear>
 
     <organization>
@@ -53,55 +50,22 @@
         </developer>
     </developers>
 
-    <!-- Project properties -->
-    <properties>
-
-    </properties>
-
-    <profiles>
-        <profile>
-            <id>icy-plugin</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
-
-    <!-- List of project's dependencies -->
     <dependencies>
-        <!-- The core of Icy -->
         <dependency>
             <groupId>org.bioimageanalysis.icy</groupId>
-            <artifactId>icy-kernel</artifactId>
-			<version>${icy-kernel.version}</version>
-        </dependency>
-		
-		<dependency>
-            <groupId>org.bioimageanalysis.icy</groupId>
-            <artifactId>blockvars</artifactId>
-			<version>${blockvars.version}</version>
+            <artifactId>ezplug</artifactId>
         </dependency>
-
-        <!-- The EzPlug library, simplifies writing UI for Icy plugins. -->
         <dependency>
             <groupId>org.bioimageanalysis.icy</groupId>
-            <artifactId>ezplug</artifactId>
-			<version>${ezplug.version}</version>
+            <artifactId>protocols</artifactId>
         </dependency>
-		
-		<dependency>
-                <groupId>org.bioimageanalysis.icy</groupId>
-                <artifactId>icy-bioformats</artifactId>
-                <version>${icy-bioformats.version}</version>
-            </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>
+            <url>https://nexus-icy.pasteur.cloud/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
deleted file mode 100644
index 68074344ee33ae06c785a18f06198858479a547b..0000000000000000000000000000000000000000
Binary files a/src/main/java/plugins/spop/rotation3D/StackRotation.class and /dev/null differ
diff --git a/src/main/java/plugins/spop/rotation3D/StackRotation.java b/src/main/java/plugins/spop/rotation3D/StackRotation.java
index 95aa8064365f2fa21d3ccddc415653465b824ab8..2bf56ebb1aa03dcb0b66db7d7a90a479725568da 100644
--- a/src/main/java/plugins/spop/rotation3D/StackRotation.java
+++ b/src/main/java/plugins/spop/rotation3D/StackRotation.java
@@ -1,168 +1,163 @@
+/*
+ * Copyright (c) 2010-2024. Institut Pasteur.
+ *
+ * This file is part of Icy.
+ * Icy is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Icy is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Icy. If not, see <https://www.gnu.org/licenses/>.
+ */
+
 package plugins.spop.rotation3D;
 
-import icy.image.IcyBufferedImage;
-import icy.sequence.Sequence;
-import icy.type.collection.array.Array1DUtil;
-import icy.util.OMEUtil;
+import org.bioimageanalysis.icy.common.collection.array.Array1DUtil;
+import org.bioimageanalysis.icy.extension.plugin.annotation_.IcyPluginIcon;
+import org.bioimageanalysis.icy.extension.plugin.annotation_.IcyPluginName;
+import org.bioimageanalysis.icy.model.OMEUtil;
+import org.bioimageanalysis.icy.model.image.IcyBufferedImage;
+import org.bioimageanalysis.icy.model.sequence.Sequence;
+import org.jetbrains.annotations.NotNull;
 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);
+@IcyPluginName("Stack Rotation")
+@IcyPluginIcon(path = "/stack-rotation.png")
+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
+    public void initialize() {
         super.addEzComponent(input);
         super.addEzComponent(type);
         // super.addOutput(output);
         super.setTimeDisplay(true);
-        
+
     }
-    
+
     @Override
-    public void execute()
-    {
-        
-        Sequence sequence = input.getValue(true);
+    public void execute() {
+        final Sequence sequence = input.getValue(true);
         Sequence seq_out = new Sequence(OMEUtil.createOMEXMLMetadata(sequence.getOMEXMLMetadata()));
-        if (type.getValue().equalsIgnoreCase("FrontToRight"))
-        {
+        if (type.getValue().equalsIgnoreCase("FrontToRight")) {
             seq_out = FrontToRight(sequence);
             seq_out.setName("FrontToRight");
         }
-        if (type.getValue().equalsIgnoreCase("FrontToTop"))
-        {
+        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++)
-                {
+
+    public static @NotNull Sequence FrontToRight(final @NotNull Sequence sequence) {
+        int z; // = 0;
+
+        final Sequence seq = new Sequence();
+
+        final int dim_x = sequence.getSizeX();
+        final int dim_y = sequence.getSizeY();
+        final int dim_z = sequence.getSizeZ();
+        final int dim_t = sequence.getSizeT();
+        final int dim_c = sequence.getSizeC();
+        final double[][] tab = new double[dim_z][dim_x * dim_y];
+        final 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++)
-                        {
+                        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 (z = 0; z < dim_x; z++) {
+                final 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++)
-                {
+
+    public static @NotNull Sequence FrontToTop(final @NotNull Sequence sequence) {
+        int z; // = 0;
+
+        final Sequence seq = new Sequence();
+
+        final int dim_x = sequence.getSizeX();
+        final int dim_y = sequence.getSizeY();
+        final int dim_z = sequence.getSizeZ();
+        final int dim_t = sequence.getSizeT();
+        final int dim_c = sequence.getSizeC();
+        final double[][] tab = new double[dim_z][dim_x * dim_y];
+        final 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];
-                        }
+                        if (dim_x >= 0) System.arraycopy(
+                                tab[z],
+                                y * dim_x, // + 0,
+                                tab_r[c][y],
+                                z * dim_x, // + 0,
+                                dim_x);
             }
-            
-            for (z = 0; z < dim_y; z++)
-            {
-                IcyBufferedImage Icy = new IcyBufferedImage(dim_x, dim_z, dim_c, sequence.getDataType());
+
+            for (z = 0; z < dim_y; z++) {
+                final 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 clean() {
     }
-    
+
     @Override
-    public void declareInput(VarList inputMap)
-    {
-        // TODO Auto-generated method stub
-        inputMap.add(input.getVariable());
-        inputMap.add(type.getVariable());
-        
+    public void declareInput(final @NotNull VarList inputMap) {
+        inputMap.add("input", input.getVariable());
+        inputMap.add("type", type.getVariable());
     }
-    
+
     @Override
-    public void declareOutput(VarList outputMap)
-    {
-        // TODO Auto-generated method stub
-        outputMap.add(output.getVariable());
-        
+    public void declareOutput(final @NotNull VarList outputMap) {
+        outputMap.add("output", output.getVariable());
     }
-    
 }
diff --git a/src/main/resources/stack-rotation.png b/src/main/resources/stack-rotation.png
new file mode 100644
index 0000000000000000000000000000000000000000..b8cc1e6b51e3d791f92dbed0c81e0e91cde0085f
Binary files /dev/null and b/src/main/resources/stack-rotation.png differ