mpicbg.models
Class CoordinateTransformMap2D

java.lang.Object
  extended by mpicbg.models.CoordinateTransformMap2D
All Implemented Interfaces:
Serializable, CoordinateTransform
Direct Known Subclasses:
TransformMeshMap2D

public class CoordinateTransformMap2D
extends Object
implements CoordinateTransform

A CoordinateTransform that is saved as a LUT on integer coordinates.

Author:
Stephan Saalfeld
See Also:
Serialized Form

Field Summary
protected  int height
           
protected  float[][] map
          target coordinates addressed interleaved as map[ row ][ 2 * column ] = x map[ row ][ 2 * column + 1 ] = y
protected  int width
           
 
Constructor Summary
CoordinateTransformMap2D(CoordinateTransform t, int width, int height)
           
CoordinateTransformMap2D(FileInputStream fis)
           
CoordinateTransformMap2D(float[][] map)
           
 
Method Summary
 double[] apply(double[] location)
          Apply the CoordinateTransform to a location.
 void applyInPlace(double[] location)
          Apply the CoordinateTransform to a location.
 void export(FileOutputStream fos)
           
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected final float[][] map
target coordinates addressed interleaved as map[ row ][ 2 * column ] = x map[ row ][ 2 * column + 1 ] = y


width

protected final int width

height

protected final int height
Constructor Detail

CoordinateTransformMap2D

public CoordinateTransformMap2D(float[][] map)

CoordinateTransformMap2D

public CoordinateTransformMap2D(CoordinateTransform t,
                                int width,
                                int height)

CoordinateTransformMap2D

public CoordinateTransformMap2D(FileInputStream fis)
                         throws IOException
Throws:
IOException
Method Detail

getWidth

public final int getWidth()

getHeight

public final int getHeight()

export

public final void export(FileOutputStream fos)
                  throws IOException
Throws:
IOException

apply

public final double[] apply(double[] location)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.

Specified by:
apply in interface CoordinateTransform
Returns:
transformed location

applyInPlace

public final void applyInPlace(double[] location)
Description copied from interface: CoordinateTransform
Apply the CoordinateTransform to a location.

Specified by:
applyInPlace in interface CoordinateTransform


Copyright © 2007-2016 Fiji. All Rights Reserved.