Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Reducing brightness dependence in nonlinear registration

Conclusion

The observed brightness dependence can likely be reduced substantially in software, although it cannot be completely eliminated where the registration channel contains no corresponding structure. The strongest immediate change is to retain Mattes mutual information for affine registration and use local cross-correlation for nonlinear SyN.

The underlying problem is better described as local information dependence than raw brightness dependence. In low-signal areas, Mattes has a relatively weak or noisy optimization gradient, so SyN’s regularization lets brighter structures elsewhere in the chunk dominate the deformation.

Evidence from the spheroid dataset

All tested representations recover essentially the same residual displacement in the dim region of interest. This confirms that the offset is real and that usable structural information remains there.

RoundApproximate correction (dy, dx)Raw NCC current -> correctedGradient NCC current -> corrected
2(+7, -8) px0.807 -> 0.9070.557 -> 0.797
3(+16, -9) px0.656 -> 0.8830.433 -> 0.747

The gradient representation made the correct match approximately 1.4--2.4 times more distinguishable than raw intensity. Log compression, contrast-limited adaptive histogram equalization (CLAHE), and local normalization found the same displacement but generally offered much smaller improvements.

The existing greater-than-zero mask is also ineffective at balancing this dataset: every voxel in the fixed reference is positive, so its metric mask covers the entire volume.

1. Mattes affine followed by CC SyN

Keep the current TRSAA/Mattes affine stage and use the now-configurable nonlinear metric to test neighborhood cross-correlation (CC) across several radii.

CC computes correlation over local neighborhoods and normalizes local mean and contrast. That directly reduces sensitivity to local brightness scaling. ANTs specifically recommends CC for deformable registration of correlated, same-modality images and notes that larger neighborhoods may help low-information regions. The established ANTs pattern is also mutual-information affine registration followed by CC deformable registration. See the ANTs guidance, ANTs SyN metric explanation, and Avants et al. evaluation.

This dataset is well suited to CC because tubulin is the common marker in every round. Radius selection needs testing because Z is anisotropic: a voxel-radius neighborhood covers a larger physical distance in Z than in XY.

Cy-ExM now carries metric: CC and its effective scalar radius through schema-v1 validation, canonical planning, cache identity, provenance, status reconstruction, and ANTs execution. Omission uses the provisional radius 4. ANTs does not expose an anisotropic per-axis CC radius: a scalar radius 4 spans 9 voxels per axis, so an anisotropic voxel grid produces a physically anisotropic neighborhood. See the ANTsPy registration API.

2. Add a structure-aware secondary metric

If CC alone does not sufficiently correct the periphery, combine:

ANTSpyX 0.6.3 already supports multivariate_extras for SyNOnly, so both metrics can estimate one diffeomorphic transform. The derived representation should only guide transform estimation; the resulting transform would still be applied to the original intensities and dependent channels.

This is especially promising because gradient NCC provided the strongest local discrimination in the observed region. ASHLAR similarly uses Laplacian or LoG filtering before phase correlation to improve alignment confidence in multiplexed fluorescence images. See the ASHLAR paper.

Estimated implementation difficulty is moderate to high, approximately three to five focused development days, because derived-image geometry, preprocessing parameters, memory use, provenance, and scientific regression tests must be carefully controlled.

3. Add spatially resolved registration quality control

Global correlation should not be the primary acceptance criterion. Add a three-dimensional blockwise residual map, stratified by local signal or structural confidence, that reports:

A practical initial target would be low-signal residuals below two pixels while keeping the bright-center residual below one pixel and introducing no folding or seam degradation. These thresholds remain proposed acceptance criteria and require validation on the approved cropped dataset before adoption.

4. Use a dense registration label in future acquisitions

The most reliable way to eliminate the dependency is a persistent, densely distributed reference label acquired in every round, ideally using the same fluorophore and acquisition settings. NHS-ester pan-protein staining or another dense biological structure such as actin has been shown to outperform sparse labels specifically in regions lacking reference signal in cyclic expansion imaging. See the dense-label cyclic ExM study.

Round 4 also changes tubulin from 488 to 561. That is not the root cause because rounds 2 and 3 show the same effect, but using the same wavelength across rounds would reduce chromatic and photometric differences.

Lower-priority options

Ongoing CC-radius characterization

Before changing chunk geometry or deformation regularization, compare the following on the approved cropped data:

  1. The current Mattes SyN baseline.

  2. CC SyN with radius 2.

  3. CC SyN with radius 4.

  4. CC SyN with radius 6 or 8 to bound the useful neighborhood scale.

  5. The best CC configuration plus a low-weight gradient or LoG metric.

Only promote a configuration that improves spatially resolved low-signal residuals, preserves bright-region alignment and global similarity, produces a physically valid warp without folding, preserves exact Cy-ExM geometry and transform invariants, and has acceptable runtime.