public class bUnwarpJ_ extends Object implements ij.plugin.PlugIn
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/
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
bUnwarpJ_() |
Modifier and Type | Method and Description |
---|---|
private static void |
adaptCoefficientsCommandLine(String[] args)
Method to adapt coefficients to new image size.
|
static void |
adaptCoefficientsMacro(String targetImageName,
String sourceImageName,
String inputElasticTransfFileName,
String outputElasticTransfFileName,
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.
|
private static void |
alignImagesCommandLine(String[] args)
Method for images alignment with no graphical interface.
|
private static void |
compareElasticRawTransformationsCommandLine(String[] args)
Method to compare an elastic deformation with a raw deformation
through the warping index (both transformations having same direction).
|
static void |
compareElasticRawTransformationsMacro(String targetImageName,
String sourceImageName,
String targetTransfFileName,
String sourceTransfFileName)
Method to compare an elastic and a raw transformations by warping index.
|
private static void |
compareElasticTransformationsCommandLine(String[] args)
Method to compare two opposite elastic deformations through the
warping index.
|
static void |
compareElasticTransformationsMacro(String targetImageName,
String sourceImageName,
String targetTransfFileName,
String sourceTransfFileName)
Method to compare two opposite elastic transformations by warping index.
|
private static void |
compareRawTransformationsCommandLine(String[] args)
Method to compare two raw deformations through the warping index
(both transformations having same direction).
|
static void |
compareRawTransformationsMacro(String targetImageName,
String sourceImageName,
String targetTransfFileName,
String sourceTransfFileName)
Method to compare two raw transformations by warping index.
|
private static void |
composeElasticTransformationsCommandLine(String[] args)
Method to compose two elastic deformations.
|
static void |
composeElasticTransformationsMacro(String targetImageName,
String sourceImageName,
String inputElasticTransfFileName1,
String inputElasticTransfFileName2,
String outputRawTransfFileName)
Method to compose two elastic transformations.
|
private static void |
composeRawElasticTransformationsCommandLine(String[] args)
Method to compose a raw deformation with an elastic deformation.
|
static void |
composeRawElasticTransformationsMacro(String targetImageName,
String sourceImageName,
String inputRawTransfFileName,
String inputElasticTransfFileName,
String outputRawTransfFileName)
Method to compose a raw transformation with an elastic transformation.
|
private static void |
composeRawTransformationsCommandLine(String[] args)
Method to compose two raw deformations.
|
static void |
composeRawTransformationsMacro(String targetImageName,
String sourceImageName,
String inputRawTransfFileName1,
String inputRawTransfFileName2,
String outputRawTransfFileName)
Method to compose two raw transformations.
|
private static void |
convertToRawTransformationCommandLine(String[] args)
Method to convert an elastic deformations into raw format.
|
static void |
convertToRawTransformationMacro(String targetImageName,
String sourceImageName,
String inputElasticTransfFileName,
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(String[] args)
Method to transform an image given an elastic deformation.
|
static void |
elasticTransformImageMacro(String targetImageName,
String sourceImageName,
String transformationFileName,
String outputFileName)
Method to transform the source image given an elastic deformation.
|
static void |
main(String[] args)
Main method for bUnwarpJ (command line).
|
private static void |
rawTransformImageCommandLine(String[] args)
Method to transform an image given an raw deformation.
|
static void |
rawTransformImageMacro(String targetImageName,
String sourceImageName,
String transformationFileName,
String outputFileName)
Method to transform the source image given an raw deformation.
|
void |
run(String commandLine)
Method to lunch the plugin.
|
private ij.ImagePlus sourceImp
private ij.ImagePlus targetImp
private static int min_scale_deformation
private static int max_scale_deformation
private static int mode
private static int maxImageSubsamplingFactor
private static double divWeight
private static double curlWeight
private static double landmarkWeight
private static double imageWeight
private static double consistencyWeight
private static boolean richOutput
private static boolean saveTransformation
private int min_scale_image
private static double stopThreshold
public void run(String commandLine)
run
in interface ij.plugin.PlugIn
commandLine
- command to determine the actionpublic 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)
targetImp
- input target imagesourceImp
- input source imagetargetMskIP
- target masksourceMskIP
- source maskmode
- 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 weightcurlWeight
- curl weightlandmarkWeight
- landmark weightimageWeight
- image similarity weightconsistencyWeight
- consistency weightstopThreshold
- stopping thresholdpublic 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)
targetImp
- input target imagesourceImp
- input source imagetargetMskIP
- target masksourceMskIP
- source maskmode
- 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 weightcurlWeight
- curl weightlandmarkWeight
- landmark weightimageWeight
- image similarity weightconsistencyWeight
- consistency weightstopThreshold
- stopping thresholdxScale
- scale factor for x axisyScale
- scale factor for y axispublic static void main(String[] args)
args
- arguments to decide the actionprivate static void alignImagesCommandLine(String[] args)
args
- arguments for the programprivate ij.ImagePlus[] createImageList()
private static void dumpSyntax()
private static void adaptCoefficientsCommandLine(String[] args)
args
- program argumentsprivate static void elasticTransformImageCommandLine(String[] args)
args
- program argumentsprivate static void rawTransformImageCommandLine(String[] args)
args
- program argumentsprivate static void compareElasticTransformationsCommandLine(String[] args)
args
- program argumentsprivate static void compareElasticRawTransformationsCommandLine(String[] args)
args
- program argumentsprivate static void compareRawTransformationsCommandLine(String[] args)
args
- program argumentsprivate static void convertToRawTransformationCommandLine(String[] args)
args
- program argumentsprivate static void composeRawTransformationsCommandLine(String[] args)
args
- program argumentsprivate static void composeElasticTransformationsCommandLine(String[] args)
args
- program argumentsprivate static void composeRawElasticTransformationsCommandLine(String[] args)
args
- program argumentspublic static void elasticTransformImageMacro(String targetImageName, String sourceImageName, String transformationFileName, String outputFileName)
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
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)public static void rawTransformImageMacro(String targetImageName, String sourceImageName, String transformationFileName, String outputFileName)
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
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)public static void compareElasticTransformationsMacro(String targetImageName, String sourceImageName, String targetTransfFileName, String sourceTransfFileName)
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
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)public static void compareElasticRawTransformationsMacro(String targetImageName, String sourceImageName, String targetTransfFileName, String sourceTransfFileName)
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
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)public static void compareRawTransformationsMacro(String targetImageName, String sourceImageName, String targetTransfFileName, String sourceTransfFileName)
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
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)public static void convertToRawTransformationMacro(String targetImageName, String sourceImageName, String inputElasticTransfFileName, String outputRawTransfFileName)
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
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)public static void composeElasticTransformationsMacro(String targetImageName, String sourceImageName, String inputElasticTransfFileName1, String inputElasticTransfFileName2, String outputRawTransfFileName)
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
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)public static void composeRawTransformationsMacro(String targetImageName, String sourceImageName, String inputRawTransfFileName1, String inputRawTransfFileName2, String outputRawTransfFileName)
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
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)public static void composeRawElasticTransformationsMacro(String targetImageName, String sourceImageName, String inputRawTransfFileName, String inputElasticTransfFileName, String outputRawTransfFileName)
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
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)public static void adaptCoefficientsMacro(String targetImageName, String sourceImageName, String inputElasticTransfFileName, String outputElasticTransfFileName, String sizeFactor)
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...)
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)Copyright © 2009–2016 Helmut Ahammer, Philipp Kainz. All rights reserved.