artisynth.core.util
Class AmiraLandmarkReader

java.lang.Object
  extended by artisynth.core.util.AmiraLandmarkReader

public class AmiraLandmarkReader
extends java.lang.Object

A class to read an ascii landmark file exported from Amira


Nested Class Summary
static class AmiraLandmarkReader.AmiraLandmarkFileFilter
           
 
Constructor Summary
AmiraLandmarkReader()
           
 
Method Summary
static Point3d[] read(java.io.Reader reader, double scale)
          Creates an array of 3D points from the landmark data from a Reader
static Point3d[] read(java.lang.String fileName)
          Creates an array of 3D points from the landmark data from a file
static Point3d[] read(java.lang.String fileName, double scale)
          Creates an array of 3D points from the landmark data from a file
static Point3d[][] readSets(java.io.Reader reader, double scale)
          Creates an 2D array of 3D points from the landmark data from a Reader
static Point3d[][] readSets(java.lang.String fileName)
          Creates an 2D array of 3D points from the landmark data from a file
static Point3d[][] readSets(java.lang.String fileName, double scale)
          Creates an 2D array of 3D points from the landmark data from a file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmiraLandmarkReader

public AmiraLandmarkReader()
Method Detail

read

public static Point3d[] read(java.lang.String fileName)
                      throws java.io.IOException
Creates an array of 3D points from the landmark data from a file

Parameters:
fileName - path name of the .landmarksAscii file
Returns:
list of points read from file
Throws:
java.io.IOException - if this is a problem reading the file

readSets

public static Point3d[][] readSets(java.lang.String fileName)
                            throws java.io.IOException
Creates an 2D array of 3D points from the landmark data from a file

Parameters:
fileName - path name of the .landmarksAscii file
Returns:
list of points read from file
Throws:
java.io.IOException - if this is a problem reading the file

read

public static Point3d[] read(java.lang.String fileName,
                             double scale)
                      throws java.io.IOException
Creates an array of 3D points from the landmark data from a file

Parameters:
fileName - path name of the .landmarksAscii file
scale - factor by which node coordinate data should be scaled
Returns:
list of points read from file
Throws:
java.io.IOException - if this is a problem reading the file

readSets

public static Point3d[][] readSets(java.lang.String fileName,
                                   double scale)
                            throws java.io.IOException
Creates an 2D array of 3D points from the landmark data from a file

Parameters:
fileName - path name of the .landmarksAscii file
scale - factor by which node coordinate data should be scaled
Returns:
list of points read from file
Throws:
java.io.IOException - if this is a problem reading the file

read

public static Point3d[] read(java.io.Reader reader,
                             double scale)
                      throws java.io.IOException
Creates an array of 3D points from the landmark data from a Reader

Parameters:
reader - reader from which to read amira landmark data
scale - factor by which node coordinate data should be scaled
Returns:
list of points read from file
Throws:
java.io.IOException - if this is a problem reading the file

readSets

public static Point3d[][] readSets(java.io.Reader reader,
                                   double scale)
                            throws java.io.IOException
Creates an 2D array of 3D points from the landmark data from a Reader

Parameters:
reader - reader from which to read amira landmark data
scale - factor by which node coordinate data should be scaled
Returns:
list of points read from file
Throws:
java.io.IOException - if this is a problem reading the file