Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lacan committed Jun 6, 2016
1 parent 6d89ebb commit 137b353
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/main/java/SVG_ROI.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import java.io.File;
import java.io.IOException;

import java.net.URI;

import org.apache.batik.*;
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.DocumentLoader;
import org.apache.batik.bridge.GVTBuilder;
Expand All @@ -11,10 +7,16 @@
import org.apache.batik.dom.svg.SAXSVGDocumentFactory;
import org.apache.batik.dom.svg.SVGOMSVGElement;
import org.apache.batik.util.XMLResourceDescriptor;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

import ij.IJ;

import java.net.URI;
import java.io.Console;
import java.io.File;
import java.io.IOException;

/**
* Responsible for converting all SVG path elements into MetaPost curves.
Expand Down Expand Up @@ -42,7 +44,7 @@ public void run() {
int pathNodeCount = pathNodes.getLength();

for( int iPathNode = 0; iPathNode < pathNodeCount; iPathNode++ ) {
pathNodes.item( iPathNode ).toString();
System.out.println(pathNodes.item(iPathNode).toString());
}
}

Expand All @@ -61,8 +63,8 @@ private NodeList getPathElements() {
*
* @return The SVG document typecast into an SVGOMSVGElement.
*/
private SVGOMSVGElement getSVGDocumentRoot() {
return (SVGOMSVGElement)getSVGDocument().getDocumentElement();
private Element getSVGDocumentRoot() {
return getSVGDocument().getDocumentElement();
}

/**
Expand Down Expand Up @@ -124,7 +126,7 @@ private Document createSVGROIs( String uri ) throws IOException {
* @throws IOException Error reading the SVG file.
*/
public static void main( String args[] ) throws IOException {
URI uri = new File( args[0] ).toURI();
URI uri = new File( "D:\\People\\Bianca\\svg\\Annotation2014_141_0000.svg" ).toURI();
SVG_ROI svgroi = new SVG_ROI( uri.toString() );
svgroi.run();
}
Expand Down

0 comments on commit 137b353

Please sign in to comment.