Difference between revisions of "Register Virtual Stack Slices"
m |
m (Added category) |
||
Line 61: | Line 61: | ||
* [http://www.ini.uzh.ch/~acardona/howto.html#register_virtual_stack Register Virtual Stack] at TrakEM2 website. | * [http://www.ini.uzh.ch/~acardona/howto.html#register_virtual_stack Register Virtual Stack] at TrakEM2 website. | ||
* [http://www.ini.uzh.ch/~acardona/howto.html#sift_parameters SIFT parameters explained] at TrakEM2 website. | * [http://www.ini.uzh.ch/~acardona/howto.html#sift_parameters SIFT parameters explained] at TrakEM2 website. | ||
+ | |||
+ | [[Category:Plugins]][[Category:Registration]] |
Revision as of 15:21, 19 May 2008
This plugin takes a list of image slices stored in a folder, and delivers a list of registered image slices (with enlarged canvas).
The registration is translation only, or rotation+translation. No scaling, no non-linear deformations.
The process is as follows:
- Select "Plugins - Registration - Register Virtual Stack Slices"
- Select whether to register with translation only (phase-correlation), or both translation and rotation (SIFT).
On choosing SIFT one can still constrain the registration to be translation-only in the following dialog. - If SIFT was chosen, specify algorithm parameters.
- Select the source directory to read images from. The names must be bit-sortable.
- Select the target directory to store registered images to.
Example
Even this sequence of rather noisy transmission electron microscopy images, with considerable variations from slice to slice, get registered properly:
Raw: | Registered: |
![]() | ![]() |
Scripting / PlugIn
You can call the plugin in a non-interactive fashion from java code:
import ini.trakem2.imaging.Registration; import register_virtual_stack.Register_Virtual_Stack_Slices; [...] String source_dir = "/path/to/source/"; String target_dir = "/path/to/target/"; // can be PHASE_CORRELATION or SIFT int registration_type = Register_Virtual_Stack_Slices.PHASE_CORRELATION; // Can be null if using PHASE_CORRELATION Registration.SIFTParameters sp = new Registration.SIFTParameters(); // image scale at which phase-correlation works, for performance float scale = 0.5f; // minimum cross-correlation score to accept phase-correlation results, otherwise try pure cross-correlation // (use as low as 0.4 if images are noisy, or at your discretion) float min_R = 0.7; Register_Virtual_Stack_Slices.exec(source_dir, target_dir, registration_type, sp, scale, min_R);
The above can of course be called from any scripting language, such as Jython:
from ini.trakem2.imaging import Registration from register_virtual_stack import Register_Virtual_Stack_Slices source_dir = "/path/to/source/" target_dir = "/path/to/target/" registration_type = Register_Virtual_Stack_Slices.PHASE_CORRELATION sp = new Registration.SIFTParameters() scale = 0.5 min_R = 0.7 Register_Virtual_Stack_Slices.exec(source_dir, target_dir, registration_type, sp, scale, min_R);
See also
- Register Virtual Stack at TrakEM2 website.
- SIFT parameters explained at TrakEM2 website.