Documente Academic
Documente Profesional
Documente Cultură
It is worth noting the Boolean switch has no value. The presence of switch is True
and the absence is False. For instance, “-save_alpha” specifies true values for
saving alpha channel.
A call to the executable may include both positioned arguments and switches. The latter can be
given in any order and at any position. Positioned arguments are ordered, but may be
separated by one or more switches. All arguments and switches must be separated by white
spaces.
or
da_i2k_align_exec_v2 –h
Again, the switch “-image_type 0” can be placed at any position, or even at the end of the
command.
We can then use the switch “-list [text file name]”. The command line will look like:
da_i2k_align_exec_v2 -list image-list.txt
Example 5. Align a set of images. The result will be a set of output images
The align output produces a set of transformed/warped images, each corresponding to one
of the input images, and all aligned in the same coordinate system.
Using the image list file shown in Example 2, the command line will look like:
Summary of switches
We introduced three switches in this section:
-image_type [integer]: Use this to specify the image type to use. The default value
is 1, which represents photographic image type. Value 0 represents retinal images, 2
indicates single-modality images (but typically not retinal, and not photographic),
and 3 says the images are of mixed modality (“multi-modality”), such as IR and
photographic, or different wave-length IR images.
-layout [integer]: It specifies the layout type to use. The default value is 0, which
represents auto layout, which means i2k Align figures it out automatically. The
value can be in the range of 0 to 7: 1 is planar, 2 is cylindrical, 3 is reposition, 4 is
similarity, 5 is affine, 6 is homography, and 7 is quadratic. Please note that each
image type may allow only a subset of these layout types. For instance, retinal
image type allows only affine and quadratic1.
-aggressive [integer]: It specifies the aggressive value to use during image
registration. The default value is 1 and the range is from 1 to 10. 10 is the most
aggressive setting. In other words, the program will try to search more hypotheses
and use relaxed acceptance criteria.
-list [text file name]: Use this to tell i2k Align the name of the text file that provides
image names. Each line of the text file is treated as one image name. If the line
starts with “#” sign, the line is treated as comment line and is ignored.
-output_type [integer]: specify the output type. The default value is 0, which
represents a mosaic. Value 1 is a set of aligned images, 2 is Montage Sequence, 3 is
Synchronized mode, and 4 is no graphic output. Note that 2 and 3 are only available
in the Pro version of the software.
-dir [path]: specify the output location.
License Status
Both i2k Align and i2k Retina need to find the license in order to function correctly.
Normally the software installer creates a license folder and it is shared and used by both the GUI
program and the command-line executable.
1
Auto layout is treated as quadratic layout in retinal image type.
If not specified, the default license folder will be used. One can choose a difference license
folder by adding the "-license [folder path]" to the command. The search of license folder is
carried out by the software in the following descending order:
When integrating i2k Retina library or working with the command-line executable, it is
recommended that the same license folder shall be used in all situations, whether it is
mosaicking, license activation, deactivation or license query. Otherwise, different or even
conflicting behaviors may be observed.
The command will show the current license status without running on any images. The
output looks similar to the following during the trial:
…
i2k Align Trial 2.1.6Build426 library is initialized.
i2k library is initialized.
After calling available_functions(): return code=0
state=InTrial
license_type=Trial
num_days_remaining=15
num_runs_remaining=75
product_name=i2k Align Trial
customer_name=
company_name=
functions=Register:Montage:Align:AlignSeq:ProFunctions:MultiBand:
Sync:MemFunctions
image_types=Retinal:Photographic:NonPhotographic:MultiModal
are_retinal_images_allowed=1
Number_simlutaneous_sessions_allowed=1
Quitting after license status is shown.
Number_simlutaneous_sessions_allowed=2
Quitting after license status is shown.
The license_type can have the value of Trial, Perpetual, Subscription, or Token. The state
represents the current state of the license. It can have value of InTrial (during trial), Expired,
Activated (a license is in place). Both the num_days_remaining and num_runs_remaining can
be -1, 0, or positive integers. -1 represents unlimited value (as in the case of perpetual license).
0 represents no value left and usually results in license expiration. Positive integers represent
the remaining value.
The values of customer_name and company_name are extracted from the license. These
values will be empty during trial.
The image_types represents the image types allowed to be used and the functions
represents the functionalities allowed to be used. The multiple values are separated by ‘:’ mark.
To use this, simply substitute in the 16-digit activation code that you received. The code
1234-1234-1234-1234 shown in the command is for demonstration purpose only and will not
work. Remember to supply the license folder with -license /my/path/to/license if a
different one is used.
a) Obtain machine id
da_i2k_align_exec_v2 -machine_id
c) Final Activation
You will receive the license file back in a return email. Since this is done manually, it may
take a bit of time. Save the license file from the email, copy it to the machine running i2k Align,
and apply the following command:
da_i2k_align_exec_v2 -activate 1234-5678-1234-5678 -manual_file
c:\abc\license.txt –license /my/path/to/license
Replace c:\abc\license.txt with the path to the saved license file. The activation code must
be supplied as well. The program will validate the activation code and the license file, write in
the license folder, and the print a message saying that the activation is successful. The “-
license /my/path/to/license” is needed when using a non-default license folder. If this
switch is not present, the license file will be written in the default license folder.
Example 4. Deactivation
The command to deactivate a license is
da_i2k_align_exec_v2 -deactivate
Note that it requires the Internet connection to complete the deactivation procedure.
Please remember to supply the license folder with -license /my/path/to/license if a
different one is used.
This command is particularly useful to transfer license to a new computer. To do so, first
deactivate from the current computer. Then activate again on a new computer. The
deactivation step essentially returns the license to DualAlign’s licensing server and makes it
available to be used again.
Summary of switches
We introduced three switches in this section:
-license [path to license folder]: look for license file in the given license folder.
-license_status: show the licensing status if the switch is present. The program will
quit after the status is shown.
-activate [activation code]: activate the software with the given 16-digit activation
code. It requires Internet connection.
-machine_id [Boolean]: show the machine ID and quit if the switch is present.
-manual_file [path to the license file]: Supply the license file during manual
activation.
-deactivate [Boolean]: deactivate the license and quit if the value is 1.
Advanced Switches
-save_xforms
This switch turns on saving of the transform and matches files. The format of these two files
is described in xforms-and-matches.pdf.
The file names will have appendix of xform- and matches-, followed by the phrase as in the
mosaic image file.
Surrogate Image
b1.tiff
b2.tiff
a1.tiff and b1.tiff must have been specified in the input images. a2.tiff will replace a1.tiff
and b2.tiff will replace b1.tiff for the final output, such as in mosaic or in aligned
images. The warping of images is still based on the registration results which was
computed from the input images.
-num_bands [integer]
i2k Align Pro is capable of processing multi-band images. It will first align different
band images from the same viewpoint and then align different viewpoints by matching
the same bands. To make use of this feature, you will need to specify number of bands
first using this switch.
In the presence of switch, i2k Align Pro assumes the input images are first grouped by
bands. For instance, if there are 3 bands and 6 input images, e.g., 1.tiff to 6.tiff, software
Please see -num_bands for the details. The band names will be used in the output of
Mosaic Sequence.
-align_illum
This switch turns on illumination correction when the output is a set of aligned images (-
output_type 1). The default is not to applied illumination correction and preserves the original
appearance. But there are cases, for instance, between retinal fundus color images, where the
comparison is more meaningful with the illumination correction.
This switch does not affect other output types, including mosaic output.
All ROI specifications are carried out in the order they are listed. In other words, a latter
entry overwrites a former one.
b.tiff
IMAGE b_mask.png
c.jpg
NONE
d.jpg
RECT 0 0 400 300
In this example, all images other than b.tiff, c.jpg and d.jpg will have the ROI detected based
on the background intensity. The ROI detection is carried out on individual images. Thus,
different images may have different ROI.
“-roi_output [file name]” takes a text file in the same format. It is applied after image
registration and prior to output generation.
Multi-row Mode
When registering a large number of images, prior information such as image acquisition
pattern can help i2k Align Pro to quickly identify image pairs that need to be registered and thus
have the advantage of time saving and robustness.
One particular image acquisition pattern is what we call “Multi-row Mode” where images
are acquired by sweeping along a row and then another.
-use_multirow
This Boolean switch instructs i2k Align Pro to enter Multi-row Mode. In other words, the
software will first register consecutive images in a row and then register images between rows.
This switch shall be used with “-list [file name]” switch where the list file can contain the row
separation information.
Taking the following images as an example:
08200311.JPG
08200312.JPG
08200313.JPG
08200314.JPG
08200315.JPG
Notice the extra blank line between image 08200310.JPG and 08200311.JPG. This blank line
informs the software the end of a row and starting of a second row. The software assumes the
beginning of a row overlaps with the beginning of a second row (or its neighboring rows, see
switch -multirow_max_index_offset) and the end of a row overlaps with the end of a second
row. The direction can be changed by using –multirow_serpentine switch.
Then we can simply run the command as:
da_i2k_align_exec_v2 -use_multirow -multirow_serpentine -list
list.txt -layout 1
At the end of the run, the software creates a mosaic that looks like the one below:
-multirow_serpentine
-multirow_max_index_offset [integer]
This switch instructs the software how to match between rows. The default value is 0. In
other words, it assumes images are taken in grid-like pattern --- an image on a second row is
only matched to the corresponding image on the first row. The actual correspondence, whether
the beginning or the end of the first row, depends on whether -multirow_serpentine switch is
used.
Increasing this value will enlarge the range where images are matched between rows. For
instance, if this value is 2, an image on a second row will be matched to the corresponding
image on the first row, its left two neighbors, and its right two neighbors.
Utility Switches
-thread [integer]
This switch specifies number of threads to use during the computation. The default value
corresponds to the number of physical processor units available. On Intel-based platforms, it is
the number of cores.
-mem [integer]
This switch specifies the maximum amount of memory to be used in the unit of mega-bytes. It
shall be noted that specifying a number larger than the amount of physical memory may lead to
abortion caused by running out of memory.
It shall also be noted that on 32-bit Windows, this value shall not be larger than 1300 (i.e.,
1.3Gb). 32-bit Windows has a hard limit the each process can use maximum 2GB memory space.
But because of the kernel and separate memory pools for each dll, the practical amount is much
less and 1.3Gb is a reasonable number to use.
-log_level [integer]
This switch specifies the log level of the run and shall be used for problem diagnosis. The
default value is 0, which turns of logging. The maximum number is 10. The value of 3 or greater
will substantially slow the program due to output of log and associated intermediate images.
-loop [integer]
This switch specifies the number of iterations. The default is one (1). In other words, the
operation is carried out once and then quit. As the program behavior is deterministic, there is
rarely any chance to use this switch other than monitoring the memory consumption.
-monitor_time [interger]
This switch specifies the time interval, in the number of millisecond, to poll the current status.
The progress output will be written to the standard error channel of the terminal.
Final Notes
Sometimes a file name may contain one or more white spaces. To supply such a file to the
executable and to prevent OS breaking it into multiple arguments, one needs to quote the
complete file name, for instance, “my image.png”. Otherwise, the executable will receive two
separate arguments from the operating system, one is “my” and the other is “image.png”.