bunwarpj
Class bUnwarpJ_

java.lang.Object
  extended by bunwarpj.bUnwarpJ_
All Implemented Interfaces:
ij.plugin.PlugIn

public class bUnwarpJ_
extends java.lang.Object
implements ij.plugin.PlugIn

Main class for the image registration plugin for ImageJ/Fiji.

This class is a plugin for the ImageJ/Fiji interface. It allows pairwise image registration combining the ideas of elastic registration based on B-spline models and consistent registration.

This work is an extension by Ignacio Arganda-Carreras and Jan Kybic of the previous UnwarpJ project by Carlos Oscar Sanchez Sorzano.

For more information visit the main site http://biocomp.cnb.csic.es/~iarganda/bUnwarpJ/

Version:
2.6 10/17/2009
Author:
Ignacio Arganda-Carreras (ignacio.arganda@gmail.com)

Field Summary
private static double consistencyWeight
          consistency weight
private static double curlWeight
          curl weight
private static double divWeight
          divergence weight
private static double imageWeight
          image similarity weight
private static double landmarkWeight
          landmarks weight
private static int max_scale_deformation
          maximum scale deformation
private static int maxImageSubsamplingFactor
          image subsampling factor at the highest pyramid level
private static int min_scale_deformation
          minimum scale deformation
private  int min_scale_image
          minimum image scale
private static int mode
          algorithm mode (fast, accurate or mono)
private static boolean richOutput
          flag for rich output (verbose option)
private static boolean saveTransformation
          flag for save transformation option
private  ij.ImagePlus sourceImp
          Image representation for source image
private static double stopThreshold
          stopping threshold
private  ij.ImagePlus targetImp
          Image representation for target image
 
Constructor Summary
bUnwarpJ_()
           
 
Method Summary
private static void adaptCoefficientsCommandLine(java.lang.String[] args)
          Method to adapt coefficients to new image size.
static void adaptCoefficientsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String inputElasticTransfFileName, java.lang.String outputElasticTransfFileName, java.lang.String sizeFactor)
          Method to adapt an elastic transformation given a new image size.
static ij.ImagePlus[] alignImagesBatch(ij.ImagePlus targetImp, ij.ImagePlus sourceImp, ij.process.ImageProcessor targetMskIP, ij.process.ImageProcessor sourceMskIP, int mode, int img_subsamp_fact, int min_scale_deformation, int max_scale_deformation, double divWeight, double curlWeight, double landmarkWeight, double imageWeight, double consistencyWeight, double stopThreshold)
          Method for images alignment with no graphical interface.
static ij.ImagePlus[] alignImagesBatch(ij.ImagePlus targetImp, ij.ImagePlus sourceImp, ij.process.ImageProcessor targetMskIP, ij.process.ImageProcessor sourceMskIP, int mode, int img_subsamp_fact, int min_scale_deformation, int max_scale_deformation, double divWeight, double curlWeight, double landmarkWeight, double imageWeight, double consistencyWeight, double stopThreshold, double xScale, double yScale)
          Method for images alignment with no graphical interface.
static ij.ImagePlus[] alignImagesBatch(ij.ImagePlus targetImp, ij.ImagePlus sourceImp, ij.process.ImageProcessor targetMskIP, ij.process.ImageProcessor sourceMskIP, Param parameter)
          Method for images alignment with no graphical interface.
private static void alignImagesCommandLine(java.lang.String[] args)
          Method for images alignment with no graphical interface.
private static void compareElasticRawTransformationsCommandLine(java.lang.String[] args)
          Method to compare an elastic deformation with a raw deformation through the warping index (both transformations having same direction).
static void compareElasticRawTransformationsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String targetTransfFileName, java.lang.String sourceTransfFileName)
          Method to compare an elastic and a raw transformations by warping index.
private static void compareElasticTransformationsCommandLine(java.lang.String[] args)
          Method to compare two opposite elastic deformations through the warping index.
static void compareElasticTransformationsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String targetTransfFileName, java.lang.String sourceTransfFileName)
          Method to compare two opposite elastic transformations by warping index.
private static void compareRawTransformationsCommandLine(java.lang.String[] args)
          Method to compare two raw deformations through the warping index (both transformations having same direction).
static void compareRawTransformationsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String targetTransfFileName, java.lang.String sourceTransfFileName)
          Method to compare two raw transformations by warping index.
private static void composeElasticTransformationsCommandLine(java.lang.String[] args)
          Method to compose two elastic deformations.
static void composeElasticTransformationsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String inputElasticTransfFileName1, java.lang.String inputElasticTransfFileName2, java.lang.String outputRawTransfFileName)
          Method to compose two elastic transformations.
private static void composeRawElasticTransformationsCommandLine(java.lang.String[] args)
          Method to compose a raw deformation with an elastic deformation.
static void composeRawElasticTransformationsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String inputRawTransfFileName, java.lang.String inputElasticTransfFileName, java.lang.String outputRawTransfFileName)
          Method to compose a raw transformation with an elastic transformation.
private static void composeRawTransformationsCommandLine(java.lang.String[] args)
          Method to compose two raw deformations.
static void composeRawTransformationsMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String inputRawTransfFileName1, java.lang.String inputRawTransfFileName2, java.lang.String outputRawTransfFileName)
          Method to compose two raw transformations.
static Transformation computeTransformationBatch(ij.ImagePlus targetImp, ij.ImagePlus sourceImp, ij.process.ImageProcessor targetMskIP, ij.process.ImageProcessor sourceMskIP, int mode, int img_subsamp_fact, int min_scale_deformation, int max_scale_deformation, double divWeight, double curlWeight, double landmarkWeight, double imageWeight, double consistencyWeight, double stopThreshold)
          Method for images alignment with no graphical interface.
static Transformation computeTransformationBatch(ij.ImagePlus targetImp, ij.ImagePlus sourceImp, ij.process.ImageProcessor targetMskIP, ij.process.ImageProcessor sourceMskIP, Param parameter)
          Method for images alignment with no graphical interface.
private static void convertToRawTransformationCommandLine(java.lang.String[] args)
          Method to convert an elastic deformations into raw format.
static void convertToRawTransformationMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String inputElasticTransfFileName, java.lang.String outputRawTransfFileName)
          Method to convert an elastic deformation into raw format.
private  ij.ImagePlus[] createImageList()
          Create a list with the open images in ImageJ that bUnwarpJ can process.
private static void dumpSyntax()
          Method to write the syntax of the program in the command line.
private static void elasticTransformImageCommandLine(java.lang.String[] args)
          Method to transform an image given an elastic deformation.
static void elasticTransformImageMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String transformationFileName, java.lang.String outputFileName)
          Method to transform the source image given an elastic deformation.
static void main(java.lang.String[] args)
          Main method for bUnwarpJ (command line).
private static void rawTransformImageCommandLine(java.lang.String[] args)
          Method to transform an image given an raw deformation.
static void rawTransformImageMacro(java.lang.String targetImageName, java.lang.String sourceImageName, java.lang.String transformationFileName, java.lang.String outputFileName)
          Method to transform the source image given an raw deformation.
 void run(java.lang.String commandLine)
          Method to lunch the plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceImp

private ij.ImagePlus sourceImp
Image representation for source image


targetImp

private ij.ImagePlus targetImp
Image representation for target image


min_scale_deformation

private static int min_scale_deformation
minimum scale deformation


max_scale_deformation

private static int max_scale_deformation
maximum scale deformation


mode

private static int mode
algorithm mode (fast, accurate or mono)


maxImageSubsamplingFactor

private static int maxImageSubsamplingFactor
image subsampling factor at the highest pyramid level


divWeight

private static double divWeight
divergence weight


curlWeight

private static double curlWeight
curl weight


landmarkWeight

private static double landmarkWeight
landmarks weight


imageWeight

private static double imageWeight
image similarity weight


consistencyWeight

private static double consistencyWeight
consistency weight


richOutput

private static boolean richOutput
flag for rich output (verbose option)


saveTransformation

private static boolean saveTransformation
flag for save transformation option


min_scale_image

private int min_scale_image
minimum image scale


stopThreshold

private static double stopThreshold
stopping threshold

Constructor Detail

bUnwarpJ_

public bUnwarpJ_()
Method Detail

run

public void run(java.lang.String commandLine)
Method to lunch the plugin.

Specified by:
run in interface ij.plugin.PlugIn
Parameters:
commandLine - command to determine the action

computeTransformationBatch

public static Transformation computeTransformationBatch(ij.ImagePlus targetImp,
                                                        ij.ImagePlus sourceImp,
                                                        ij.process.ImageProcessor targetMskIP,
                                                        ij.process.ImageProcessor sourceMskIP,
                                                        int mode,
                                                        int img_subsamp_fact,
                                                        int min_scale_deformation,
                                                        int max_scale_deformation,
                                                        double divWeight,
                                                        double curlWeight,
                                                        double landmarkWeight,
                                                        double imageWeight,
                                                        double consistencyWeight,
                                                        double stopThreshold)
Method for images alignment with no graphical interface. This method gives as result a Transformation object that contains all the registration information.

Parameters:
targetImp - input target image
sourceImp - input source image
targetMskIP - target mask
sourceMskIP - source mask
mode - accuracy mode (0 - Fast, 1 - Accurate, 2 - Mono)
img_subsamp_fact - image subsampling factor (from 0 to 7, representing 2^0=1 to 2^7 = 128)
min_scale_deformation - (0 - Very Coarse, 1 - Coarse, 2 - Fine, 3 - Very Fine)
max_scale_deformation - (0 - Very Coarse, 1 - Coarse, 2 - Fine, 3 - Very Fine, 4 - Super Fine)
divWeight - divergence weight
curlWeight - curl weight
landmarkWeight - landmark weight
imageWeight - image similarity weight
consistencyWeight - consistency weight
stopThreshold - stopping threshold
Returns:
results transformation object

computeTransformationBatch

public static Transformation computeTransformationBatch(ij.ImagePlus targetImp,
                                                        ij.ImagePlus sourceImp,
                                                        ij.process.ImageProcessor targetMskIP,
                                                        ij.process.ImageProcessor sourceMskIP,
                                                        Param parameter)
Method for images alignment with no graphical interface. This method gives as result a Transformation object that contains all the registration information.

Parameters:
targetImp - input target image
sourceImp - input source image
targetMskIP - target mask
sourceMskIP - source mask
parameter - registration parameters
Returns:
results transformation object

alignImagesBatch

public static ij.ImagePlus[] alignImagesBatch(ij.ImagePlus targetImp,
                                              ij.ImagePlus sourceImp,
                                              ij.process.ImageProcessor targetMskIP,
                                              ij.process.ImageProcessor sourceMskIP,
                                              int mode,
                                              int img_subsamp_fact,
                                              int min_scale_deformation,
                                              int max_scale_deformation,
                                              double divWeight,
                                              double curlWeight,
                                              double landmarkWeight,
                                              double imageWeight,
                                              double consistencyWeight,
                                              double stopThreshold)
Method for images alignment with no graphical interface. This method gives as result an array of 2 ImagePlus containing the source-target and target-source results respectively. Each of them has three slices: the final deformed image, its target image and its mask.

Parameters:
targetImp - input target image
sourceImp - input source image
targetMskIP - target mask
sourceMskIP - source mask
mode - accuracy mode (0 - Fast, 1 - Accurate, 2 - Mono)
img_subsamp_fact - image subsampling factor (from 0 to 7, representing 2^0=1 to 2^7 = 128)
min_scale_deformation - (0 - Very Coarse, 1 - Coarse, 2 - Fine, 3 - Very Fine)
max_scale_deformation - (0 - Very Coarse, 1 - Coarse, 2 - Fine, 3 - Very Fine, 4 - Super Fine)
divWeight - divergence weight
curlWeight - curl weight
landmarkWeight - landmark weight
imageWeight - image similarity weight
consistencyWeight - consistency weight
stopThreshold - stopping threshold
Returns:
resulting ImagePlus array (with source-target and target-source results)

alignImagesBatch

public static ij.ImagePlus[] alignImagesBatch(ij.ImagePlus targetImp,
                                              ij.ImagePlus sourceImp,
                                              ij.process.ImageProcessor targetMskIP,
                                              ij.process.ImageProcessor sourceMskIP,
                                              Param parameter)
Method for images alignment with no graphical interface. This method gives as result an array of 2 ImagePlus containing the source-target and target-source results respectively. Each of them has three slices: the final deformed image, its target image and its mask.

Parameters:
targetImp - input target image
sourceImp - input source image
targetMskIP - target mask
sourceMskIP - source mask
parameter - registration parameters
Returns:
resulting ImagePlus array (with source-target and target-source results)

alignImagesBatch

public static ij.ImagePlus[] alignImagesBatch(ij.ImagePlus targetImp,
                                              ij.ImagePlus sourceImp,
                                              ij.process.ImageProcessor targetMskIP,
                                              ij.process.ImageProcessor sourceMskIP,
                                              int mode,
                                              int img_subsamp_fact,
                                              int min_scale_deformation,
                                              int max_scale_deformation,
                                              double divWeight,
                                              double curlWeight,
                                              double landmarkWeight,
                                              double imageWeight,
                                              double consistencyWeight,
                                              double stopThreshold,
                                              double xScale,
                                              double yScale)
Method for images alignment with no graphical interface. This method gives as result an array of 2 ImagePlus containing the source-target and target-source results (only final transformed image).

Parameters:
targetImp - input target image
sourceImp - input source image
targetMskIP - target mask
sourceMskIP - source mask
mode - accuracy mode (0 - Fast, 1 - Accurate, 2 - Mono)
img_subsamp_fact - image subsampling factor (from 0 to 7, representing 2^0=1 to 2^7 = 128)
min_scale_deformation - (0 - Very Coarse, 1 - Coarse, 2 - Fine, 3 - Very Fine)
max_scale_deformation - (0 - Very Coarse, 1 - Coarse, 2 - Fine, 3 - Very Fine, 4 - Super Fine)
divWeight - divergence weight
curlWeight - curl weight
landmarkWeight - landmark weight
imageWeight - image similarity weight
consistencyWeight - consistency weight
stopThreshold - stopping threshold
xScale - scale factor for x axis
yScale - scale factor for y axis
Returns:
resulting ImagePlus array (with source-target and target-source results)

main

public static void main(java.lang.String[] args)
Main method for bUnwarpJ (command line).

Parameters:
args - arguments to decide the action

alignImagesCommandLine

private static void alignImagesCommandLine(java.lang.String[] args)
Method for images alignment with no graphical interface.

Parameters:
args - arguments for the program

createImageList

private ij.ImagePlus[] createImageList()
Create a list with the open images in ImageJ that bUnwarpJ can process.

Returns:
array of references to the open images in bUnwarpJ

dumpSyntax

private static void dumpSyntax()
Method to write the syntax of the program in the command line.


adaptCoefficientsCommandLine

private static void adaptCoefficientsCommandLine(java.lang.String[] args)
Method to adapt coefficients to new image size. The factor between the old and the new image size is expected to be a power of 2, positive or negative (8, 4, 2, 0.5, 0.25, etc).

Parameters:
args - program arguments

elasticTransformImageCommandLine

private static void elasticTransformImageCommandLine(java.lang.String[] args)
Method to transform an image given an elastic deformation.

Parameters:
args - program arguments

rawTransformImageCommandLine

private static void rawTransformImageCommandLine(java.lang.String[] args)
Method to transform an image given an raw deformation.

Parameters:
args - program arguments

compareElasticTransformationsCommandLine

private static void compareElasticTransformationsCommandLine(java.lang.String[] args)
Method to compare two opposite elastic deformations through the warping index.

Parameters:
args - program arguments

compareElasticRawTransformationsCommandLine

private static void compareElasticRawTransformationsCommandLine(java.lang.String[] args)
Method to compare an elastic deformation with a raw deformation through the warping index (both transformations having same direction).

Parameters:
args - program arguments

compareRawTransformationsCommandLine

private static void compareRawTransformationsCommandLine(java.lang.String[] args)
Method to compare two raw deformations through the warping index (both transformations having same direction).

Parameters:
args - program arguments

convertToRawTransformationCommandLine

private static void convertToRawTransformationCommandLine(java.lang.String[] args)
Method to convert an elastic deformations into raw format.

Parameters:
args - program arguments

composeRawTransformationsCommandLine

private static void composeRawTransformationsCommandLine(java.lang.String[] args)
Method to compose two raw deformations.

Parameters:
args - program arguments

composeElasticTransformationsCommandLine

private static void composeElasticTransformationsCommandLine(java.lang.String[] args)
Method to compose two elastic deformations.

Parameters:
args - program arguments

composeRawElasticTransformationsCommandLine

private static void composeRawElasticTransformationsCommandLine(java.lang.String[] args)
Method to compose a raw deformation with an elastic deformation.

Parameters:
args - program arguments

elasticTransformImageMacro

public static void elasticTransformImageMacro(java.lang.String targetImageName,
                                              java.lang.String sourceImageName,
                                              java.lang.String transformationFileName,
                                              java.lang.String outputFileName)
Method to transform the source image given an elastic deformation. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-elastic_transform : TRANSFORM A SOURCE IMAGE WITH A GIVEN ELASTIC DEFORMATION
target_image : In any image format
source_image : In any image format
transformation_file : As saved by bUnwarpJ in elastic format
Output image : Output result in TIFF

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
transformationFileName - transformation file name (with path)
outputFileName - output file name (with path)

rawTransformImageMacro

public static void rawTransformImageMacro(java.lang.String targetImageName,
                                          java.lang.String sourceImageName,
                                          java.lang.String transformationFileName,
                                          java.lang.String outputFileName)
Method to transform the source image given an raw deformation. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-raw_transform : TRANSFORM A SOURCE IMAGE WITH A GIVEN RAW DEFORMATION
target_image : In any image format
source_image : In any image format
transformation_file : As saved by bUnwarpJ in raw format
Output image : Output result in TIFF

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
transformationFileName - transformation file name (with path)
outputFileName - output file name (with path)

compareElasticTransformationsMacro

public static void compareElasticTransformationsMacro(java.lang.String targetImageName,
                                                      java.lang.String sourceImageName,
                                                      java.lang.String targetTransfFileName,
                                                      java.lang.String sourceTransfFileName)
Method to compare two opposite elastic transformations by warping index. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-compare_elastic : COMPARE 2 OPPOSITE ELASTIC DEFORMATIONS (BY WARPING INDEX)
target_image : In any image format
source_image : In any image format
target_transformation_file : As saved by bUnwarpJ
source_transformation_file : As saved by bUnwarpJ

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
targetTransfFileName - target transformation file name (with path)
sourceTransfFileName - source transformation file name (with path)

compareElasticRawTransformationsMacro

public static void compareElasticRawTransformationsMacro(java.lang.String targetImageName,
                                                         java.lang.String sourceImageName,
                                                         java.lang.String targetTransfFileName,
                                                         java.lang.String sourceTransfFileName)
Method to compare an elastic and a raw transformations by warping index. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-compare_elastic_raw : COMPARE AN ELASTIC DEFORMATION WITH A RAW DEFORMATION (BY WARPING INDEX)
target_image : In any image format
source_image : In any image format
target_transformation_file : As saved by bUnwarpJ
source_transformation_file : As saved by bUnwarpJ

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
targetTransfFileName - target transformation file name (with path)
sourceTransfFileName - source transformation file name (with path)

compareRawTransformationsMacro

public static void compareRawTransformationsMacro(java.lang.String targetImageName,
                                                  java.lang.String sourceImageName,
                                                  java.lang.String targetTransfFileName,
                                                  java.lang.String sourceTransfFileName)
Method to compare two raw transformations by warping index. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-compare_raw : COMPARE 2 ELASTIC DEFORMATIONS (BY WARPING INDEX)
target_image : In any image format
source_image : In any image format
Raw Transformation File 1 : As saved by bUnwarpJ in raw format
Raw Transformation File 2 : As saved by bUnwarpJ in raw format

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
targetTransfFileName - target transformation file name (with path)
sourceTransfFileName - source transformation file name (with path)

convertToRawTransformationMacro

public static void convertToRawTransformationMacro(java.lang.String targetImageName,
                                                   java.lang.String sourceImageName,
                                                   java.lang.String inputElasticTransfFileName,
                                                   java.lang.String outputRawTransfFileName)
Method to convert an elastic deformation into raw format. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-convert_to_raw : CONVERT AN ELASTIC DEFORMATION INTO RAW FORMAT
target_image : In any image format
source_image : In any image format
Input Elastic Transformation File : As saved by bUnwarpJ in elastic format
Output Raw Transformation File : As saved by bUnwarpJ in raw format

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
inputElasticTransfFileName - input transformation file name (with path)
outputRawTransfFileName - output transformation file name (with path)

composeElasticTransformationsMacro

public static void composeElasticTransformationsMacro(java.lang.String targetImageName,
                                                      java.lang.String sourceImageName,
                                                      java.lang.String inputElasticTransfFileName1,
                                                      java.lang.String inputElasticTransfFileName2,
                                                      java.lang.String outputRawTransfFileName)
Method to compose two elastic transformations. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-compose_elastic : COMPOSE TWO ELASTIC DEFORMATIONS
target_image : In any image format
source_image : In any image format
Elastic Transformation File 1 : As saved by bUnwarpJ in elastic format
Elastic Transformation File 2 : As saved by bUnwarpJ in elastic format
Output Raw Transformation File : As saved by bUnwarpJ in raw format

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
inputElasticTransfFileName1 - first input transformation file name (with path)
inputElasticTransfFileName2 - second input transformation file name (with path)
outputRawTransfFileName - output transformation file name (with path)

composeRawTransformationsMacro

public static void composeRawTransformationsMacro(java.lang.String targetImageName,
                                                  java.lang.String sourceImageName,
                                                  java.lang.String inputRawTransfFileName1,
                                                  java.lang.String inputRawTransfFileName2,
                                                  java.lang.String outputRawTransfFileName)
Method to compose two raw transformations. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-compose_raw : COMPOSE TWO RAW DEFORMATIONS
target_image : In any image format
source_image : In any image format
Raw Transformation File 1 : As saved by bUnwarpJ in raw format
Raw Transformation File 2 : As saved by bUnwarpJ in raw format
Output Raw Transformation File : As saved by bUnwarpJ in raw format

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
inputRawTransfFileName1 - first input transformation file name (with path)
inputRawTransfFileName2 - second input transformation file name (with path)
outputRawTransfFileName - output transformation file name (with path)

composeRawElasticTransformationsMacro

public static void composeRawElasticTransformationsMacro(java.lang.String targetImageName,
                                                         java.lang.String sourceImageName,
                                                         java.lang.String inputRawTransfFileName,
                                                         java.lang.String inputElasticTransfFileName,
                                                         java.lang.String outputRawTransfFileName)
Method to compose a raw transformation with an elastic transformation. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-compose_raw_elastic : COMPOSE A RAW DEFORMATION WITH AN ELASTIC DEFORMATION
target_image : In any image format
source_image : In any image format
Raw Transformation File : As saved by bUnwarpJ in raw format
Elastic Transformation File : As saved by bUnwarpJ in elastic format
Output Raw Transformation File : As saved by bUnwarpJ in raw format

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
inputRawTransfFileName - input raw transformation file name (with path)
inputElasticTransfFileName - input elastic transformation file name (with path)
outputRawTransfFileName - output transformation file name (with path)

adaptCoefficientsMacro

public static void adaptCoefficientsMacro(java.lang.String targetImageName,
                                          java.lang.String sourceImageName,
                                          java.lang.String inputElasticTransfFileName,
                                          java.lang.String outputElasticTransfFileName,
                                          java.lang.String sizeFactor)
Method to adapt an elastic transformation given a new image size. To be called by the macro language instruction "call": http://rsb.info.nih.gov/ij/developer/macro/functions.html#call

It calls the main command line method with the following option:
-adapt_transform : ADAPT AN ELASTIC DEFORMATION GIVEN A NEW IMAGE SIZE
target_image : In any image format
source_image : In any image format
Input Elastic Transformation File : As saved by bUnwarpJ in elastic format
Output Elastic Transformation File : As saved by bUnwarpJ in elastic format
Image Size Factor : Double (0.25, 0.5, 2, 4, 8...)

Parameters:
targetImageName - target image file name (with path)
sourceImageName - source image file name (with path)
inputElasticTransfFileName - input elastic transformation file name (with path)
outputElasticTransfFileName - output elastic transformation file name (with path)
sizeFactor - double size factor (between old and new image)