Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BigDataViwer .xml file #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/main/java/HandleExtraFileTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public void run(final String path) {
return tryPlugIn("io.Open_DAT_EMMENU", path);
}

// Albert Cardona: read TrakEM2 .xml files
// Albert Cardona: read TrakEM2 .xml files or read BigDataViewer .xml file
if (name.endsWith(".xml") || name.endsWith(".xml.gz")) {
byte[] b = buf;
if (name.endsWith("z")) {
Expand All @@ -289,6 +289,8 @@ public void run(final String path) {
}
}
}

// Albert Cardona: TrakEM2 .xml file
if (-1 != new String(b).toLowerCase().indexOf("trakem2")) {
try {
// portable way, resists absence of TrakEM2_.jar in the classpath
Expand All @@ -305,6 +307,12 @@ public void run(final String path) {
}
return null;
}

// Tobias Pietzsch: BigDataViewer .xml file
if ( -1 != new String( b ).toLowerCase().indexOf( "<spimdata version=" ) )
{
return tryPlugIn( "bdv.ij.BigDataViewerPlugIn", path );
}
}

// Stephan Saalfeld: read .df3 files. Documentation at:
Expand Down Expand Up @@ -461,6 +469,11 @@ public void run(final String path) {
return tryPlugIn("org.janelia.it.fiji.plugins.h5j.H5j_Reader", path);
}

// Tobias Pietzsch, HongKee Moon: open .bdv file with BigDataBrowserPlugIn
if ( name.endsWith( ".bdv" ) )
{
return tryPlugIn( "bdv.ij.BigDataBrowserPlugIn", path );
}
// ****************** MODIFY HERE ******************
// do what ever you have to do to recognise your own file type
// and then call appropriate plugin using the above as models
Expand Down