Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
Allow ewsc files to be imported
Browse files Browse the repository at this point in the history
See fiji#9
  • Loading branch information
tferr committed Oct 27, 2016
1 parent 66937ef commit 8c5a339
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/tracing/NeuriteTracerResultsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ public NeuriteTracerResultsDialog( String title,

menuBar.add(helpMenu());

loadMenuItem = new JMenuItem("Load traces / SWC file...");
loadMenuItem = new JMenuItem("Load traces / (e)SWC file...");
loadMenuItem.addActionListener(this);
fileMenu.add(loadMenuItem);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tracing/PathAndFillManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ public boolean importSWC( BufferedReader br, boolean assumeCoordinatesIndexVoxel
if( mEmpty.matches() )
continue;
String [] fields = line.split("\\s+");
if( fields.length != 7 ) {
if( fields.length < 7 ) {
IJ.error("Wrong number of fields ("+fields.length+") in line: "+line);
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tracing/ShollAnalysisPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void run(final String ignoredArgument) {

imp = (impRequired) ? IJ.openImage(imgPath) : null;
if (impRequired && imp == null || !validTracesFile(new File(tracesPath))) {
IJ.error("Invalid image or invalid Traces/SWC file\n \n" + imgPath + "\n" + tracesPath);
IJ.error("Invalid image or invalid Traces/(e)SWC file\n \n" + imgPath + "\n" + tracesPath);
return;
}

Expand Down Expand Up @@ -254,7 +254,7 @@ private boolean showDialog() {
guessInitialPaths();

gd = new EnhancedGenericDialog("Sholll Analysis (Tracings)...");
gd.addFileField("Traces/SWC file", tracesPath, 32);
gd.addFileField("Traces/(e)SWC file", tracesPath, 32);
gd.addFileField("Image file", imgPath, 32);
gd.setInsets(0, 40, 20);
gd.addCheckbox("Load tracings without image", !impRequired);
Expand Down Expand Up @@ -365,7 +365,7 @@ public boolean dialogItemChanged(final GenericDialog arg0, final AWTEvent event)
}
if (!validTracesFile(new File(tracesPath))) {
enableOK = false;
warning += "Not a valid .traces/.swc file";
warning += "Not a valid .traces/.(e)swc file";
}
if (!warning.isEmpty()) {
infoMsg.setForeground(Utils.warningColor());
Expand Down Expand Up @@ -426,7 +426,7 @@ private boolean expectedImageFile(final File file) {
}

private boolean tracingsFile(final File file) {
final String[] tracingsExts = new String[] { ".traces", ".swc" };
final String[] tracingsExts = new String[] { ".traces", ".swc", ".eswc" };
for (final String ext : tracingsExts)
if (file.getName().toLowerCase().endsWith(ext))
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/tracing/SimpleNeuriteTracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ synchronized public void loadTracings( ) {

OpenDialog od;

od = new OpenDialog("Select .traces or .swc file...",
od = new OpenDialog("Select .traces or .(e)swc file...",
directory,
null );

Expand Down

0 comments on commit 8c5a339

Please sign in to comment.