Skip to content

Commit

Permalink
played around with installing plugins myself ... is commented
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanPreibisch committed Oct 23, 2024
1 parent 2fadc7d commit 5a98dbd
Showing 1 changed file with 66 additions and 1 deletion.
67 changes: 66 additions & 1 deletion src/main/java/net/preibisch/stitcher/plugin/BigStitcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,42 @@


import java.awt.Button;
import java.awt.Menu;
import java.awt.MenuBar;
import java.awt.TextField;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import org.scijava.command.Command;
import org.scijava.plugin.Plugin;
import org.scijava.plugin.PluginIndex;

import ij.IJ;
import ij.ImageJ;
import ij.Menus;
import ij.plugin.PlugIn;
import net.preibisch.legacy.io.IOFunctions;
import net.preibisch.legacy.io.TextFileAccess;
import net.preibisch.mvrecon.fiji.plugin.Interest_Point_Registration;
import net.preibisch.mvrecon.fiji.plugin.queryXML.GenericLoadParseQueryXML;
import net.preibisch.mvrecon.fiji.plugin.queryXML.LoadParseQueryXML;
import net.preibisch.mvrecon.fiji.spimdata.SpimData2;
Expand Down Expand Up @@ -87,10 +110,52 @@ public void actionPerformed(ActionEvent e)
public static void setupTesting()
{
IOFunctions.printIJLog = true;

//new net.imagej.ImageJ();
new ImageJ();
/*
try
{
final String bigstitcher =
new File(BigStitcher.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getPath();
System.out.println( "bigstitcher jar: " + bigstitcher );
installPluginsMenu(bigstitcher);
System.out.println( );
final String mvr =
new File(Interest_Point_Registration.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getPath();
System.out.println( "multiview-reconstruction jar: " + mvr );
installPluginsMenu(mvr);
System.exit( 0 );
}
catch (Exception e)
{
System.out.println( "Could not load bigstitcher and multiview-reconstruction locations; unable to install menu.");
e.printStackTrace();
}
MenuBar mbar = ij.getMenuBar();
System.out.println( mbar.getMenuCount() );
for ( int i = 0; i < mbar.getMenuCount(); ++i )
{
Menu menu = mbar.getMenu(i);
System.out.println( menu );
if ( menu.getLabel().equals( "Plugins" ) )
{
System.out.println( "plugins menu found ...");
menu.addSeparator();
menu.add("hallo");
menu.addSeparator();
}
}
//System.exit(0);
//if ( System.getProperty("os.name").toLowerCase().contains( "mac" ) )
// GenericLoadParseQueryXML.defaultXMLURI = "/Users/preibischs/SparkTest/Stitching/dataset.xml";
// GenericLoadParseQueryXML.defaultXMLURI = "/Users/preibischs/SparkTest/Stitching/dataset.xml";*/
}

public static void main( String[] args )
Expand Down

0 comments on commit 5a98dbd

Please sign in to comment.