edu.jhu.ece.iacl.jist.structures.fiber
Class Fiber

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.fiber.Fiber

public class Fiber
extends java.lang.Object

The Class Fiber.


Constructor Summary
Fiber()
          Instantiates a new fiber.
Fiber(XYZ[] chain)
          Instantiates a new fiber.
 
Method Summary
 boolean equals(Fiber a)
          Equals.
static Fiber[] fromVector(java.util.Vector<Fiber> vect)
          From vector.
 XYZ[] getChain()
          Gets the chain.
 RGB getColor()
          Gets the color.
 int getLength()
          Gets the length.
 double getMarker(int pt)
          Gets the marker.
 int getseedPointIndex()
          Gets the seed point index.
 int getseedPointIndex2()
          Gets the seed point index2.
 XYZ[] getXYZChain()
          Gets the xYZ chain.
 boolean intersects(Polygon p)
          Intersects.
 double length(double resX, double resY, double resZ)
          Length.
static Fiber[] makeFibersInBounds(Fiber[] in, int maxx, int maxy, int maxz)
          Make fibers in bounds.
 void makeInBounds(int maxx, int maxy, int maxz)
          Make in bounds.
 void read(LEFileReader fp, int version)
          Read.
 IntersectResult reportiIntersect(Polygon p)
          Reporti intersect.
static Fiber[] scaleForVisualization(Fiber[] in, float xs, float ys, float zs)
          Scale for visualization.
 Fiber scaleForVisualization(float xs, float ys, float zs)
          Scale for visualization.
 void setMarkerPoint(double marker, int pt)
          Sets the marker point.
 CurvePath toCurvePath()
          To curve path.
 java.lang.String toString()
           
 boolean[][][] toVolume(int[] dims)
          To volume.
static void writeVTK(Fiber[] writeme, java.lang.String filename)
          Write vtk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Fiber

public Fiber()
Instantiates a new fiber.


Fiber

public Fiber(XYZ[] chain)
Instantiates a new fiber.

Parameters:
chain - the chain
Method Detail

read

public void read(LEFileReader fp,
                 int version)
          throws java.io.IOException
Read.

Parameters:
fp - the fp
version - the version
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getLength

public int getLength()
Gets the length.

Returns:
the length

getChain

public XYZ[] getChain()
Gets the chain.

Returns:
the chain

getColor

public RGB getColor()
Gets the color.

Returns:
the color

intersects

public boolean intersects(Polygon p)
Intersects.

Parameters:
p - the p
Returns:
true, if successful

reportiIntersect

public IntersectResult reportiIntersect(Polygon p)
Reporti intersect.

Parameters:
p - the p
Returns:
the intersect result

setMarkerPoint

public void setMarkerPoint(double marker,
                           int pt)
Sets the marker point.

Parameters:
marker - the marker
pt - the pt

getMarker

public double getMarker(int pt)
Gets the marker.

Parameters:
pt - the pt
Returns:
the marker

getXYZChain

public XYZ[] getXYZChain()
Gets the xYZ chain.

Returns:
the xYZ chain

equals

public boolean equals(Fiber a)
Equals.

Parameters:
a - the a
Returns:
true, if successful

getseedPointIndex

public int getseedPointIndex()
Gets the seed point index.

Returns:
the seed point index

getseedPointIndex2

public int getseedPointIndex2()
Gets the seed point index2.

Returns:
the seed point index2

toVolume

public boolean[][][] toVolume(int[] dims)
To volume.

Parameters:
dims - the dims
Returns:
the boolean[][][]

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toCurvePath

public CurvePath toCurvePath()
To curve path.

Returns:
the curve path

length

public double length(double resX,
                     double resY,
                     double resZ)
Length.

Parameters:
resX - the res x
resY - the res y
resZ - the res z
Returns:
the double

scaleForVisualization

public Fiber scaleForVisualization(float xs,
                                   float ys,
                                   float zs)
Scale for visualization.

Parameters:
xs - the xs
ys - the ys
zs - the zs
Returns:
the fiber

scaleForVisualization

public static Fiber[] scaleForVisualization(Fiber[] in,
                                            float xs,
                                            float ys,
                                            float zs)
Scale for visualization.

Parameters:
in - the in
xs - the xs
ys - the ys
zs - the zs
Returns:
the fiber[]

makeInBounds

public void makeInBounds(int maxx,
                         int maxy,
                         int maxz)
Make in bounds.

Parameters:
maxx - the maxx
maxy - the maxy
maxz - the maxz

makeFibersInBounds

public static Fiber[] makeFibersInBounds(Fiber[] in,
                                         int maxx,
                                         int maxy,
                                         int maxz)
Make fibers in bounds.

Parameters:
in - the in
maxx - the maxx
maxy - the maxy
maxz - the maxz
Returns:
the fiber[]

fromVector

public static Fiber[] fromVector(java.util.Vector<Fiber> vect)
From vector.

Parameters:
vect - the vect
Returns:
the fiber[]

writeVTK

public static void writeVTK(Fiber[] writeme,
                            java.lang.String filename)
Write vtk.

Parameters:
writeme - the writeme
filename - the filename