Image Alignment Tool

Image Alignment Tool

Image Alignment Tool estimates and reviews a 2-D transform from the current moving image to a subject image reference, then optionally applies that transform to the entire Save Folder.

Open from DataViewer

Load .dat or image-kind .umt data and choose Utilities > Alignment Tool. A writable project/session binding is required. DataViewer passes the current frame as a locked moving source, source description, target Save Folder, and project/subject/session identifiers.

Image Alignment Tool with the active reference and moving image loaded
The active subject reference and the current moving frame are loaded in a false-color comparison view. No transform was applied during capture.

Prerequisite: create an image reference

See Image Reference Manager for full instructions.

  1. Open Utilities > Image Reference.
  2. Choose Create from current frame or Create from file.
  3. Inspect it and choose Set Active.
  4. Return to Alignment Tool and choose Select Image Reference.

Controls and workflow

ControlMeaning
Select Image ReferenceOpens Image Reference Manager in selection mode and loads the fixed image.
Select Moving sourceChooses another supported image when launched standalone; locked when DataViewer supplied the source.
Alternate View / False Color OverlayChanges comparison display only.
Use enhanced contrast / Flip HorizontallyControls registration preparation and orientation.
Automatic registrationOptionally prepares the image with fliplr and adapthisteq (falling back to imadjust), configures multimodal registration with imregconfig, estimates a similarity transform with imregtform, and previews it with imref2d and imwarp.
Free-hand Alignment / ConfirmAdjusts a box interactively, then converts its geometry to a transform.
Transformation, Step size, Apply StepFine-tunes horizontal/vertical translation, rotation, or scale.
Reset Fine Tuning / Reset RegistrationResets the fine-tuning changes or resets all changes to the registration candidate.
Apply Registration to FolderApplies the displayed geometric transformation to supported data in the Save Folder after an impact review and confirmation. See the warning and affected-file list below.

Destructive and effectively irreversible
Applying registration rewrites every .dat file in the target folder. Interpolation and out-of-frame loss cannot be reliably undone. Back up the Save Folder, review the impact summary and ROI warning, and confirm only once.

Files affected by Apply Registration to Folder

ItemWhat happens
Every .datEvery frame is warped to the reference image size and rewritten.
Image-kind .umtEntries with supported spatial dimensions are warped. Non-image UMT files and unsupported image entries are skipped and reported.
Current-format .roiROI vertices and masks are transformed. Unsupported older ROI files are skipped and reported.
DataParams.matThe view, mask, applied registration, transform, resource identifier, source/reference details, and QC summary are updated.
AcqInfos.matHeight and width are updated to the reference image size.
Other filesevents.mat, processing logs, non-image outputs, and unrelated files are not geometrically transformed.

The operation first creates a backup and writes a timestamped manualAlignmentReport_*.mat. If a write fails, the report identifies completed and restored items.

Where the transform is recorded

For a bound session, the transform is saved as a session resource managed by Project Manager. The Save Folder also keeps a local record in DataParams.mat, under DataParams.registration. This record contains the transform, whether it has been applied, the managed-resource identifier, the reference and moving sources, dates, and quality-control information. DataViewer and the tool read this local record to identify a folder that has already been transformed.

Quality-control information

Before application, compare the reference and moving images in Alternate View and False Color Overlay. After application, DataParams.registration.qcMetrics records translation in pixels, rotation in degrees, overall and X/Y scale, whether scale is uniform, whether shear is absent, and the transform determinant. The manual-adjustment record preserves fine-tuning choices.

These values describe the transform; they do not prove anatomical agreement. Inspect vessels, cortical borders, and out-of-frame regions visually before confirmation.

ROI and refresh behavior

Reload ROIs after alignment
The impact dialog reports loaded ROI risk. After a successful apply, DataViewer reloads the most suitable current file, refreshes project information, and clears loaded ROIs because their coordinates may be stale. Save or export important ROI definitions before alignment and transform or recreate them afterward.

Close behavior

Closing with an unsaved candidate asks for confirmation. Preview, view mode, and fine-tuning are temporary until apply.


Back to top

Copyright © LabeoTech 2023. This work is licensed under the GNU General Public License, Version 3.0.