InsightSoftwareConsortium / InsightSoftwareConsortium/ITKElastix

registration results are chunked, scale issue?

Open
#370 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
281
Forks
29
Avg merge
16h 28m
Merged PRs (30d)
8

Description

Dear developers,

Thank you for your handy tool.
I am trying to register 2 whole slide image (same tissue) as tif

: the large one (width:18,203 microns, height: 32,335 microns) as fixed and smaller (width:18,203 microns, height: 24,790 microns) as moving.
I am running affine first and then bspline, but the results are chunks in grey scale (even lost the channels information).
So far the most concerning issue is the truncated results.
I am suspecting the scale/size of inputs (a pixel is 0.25 microns width/height) not going well with some parameters [full_elastix.log](https://github.com/user-attachments/files/25242245/elastix.log):
Affine
```
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(UseDirectionCosines "true")
(Registration "MultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(Registration "MultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(FixedImagePyramid "FixedRecursiveImagePyramid")
(MovingImagePyramid "MovingRecursiveImagePyramid")
(Optimizer "AdaptiveStochasticGradientDescent")
(Transform "AffineTransform")
(Metric "AdvancedMattesMutualInformation")
(AutomaticScalesEstimation "true")
(AutomaticTransformInitialization "true")
(HowToCombineTransforms "Compose")
(NumberOfHistogramBins 32)
(NumberOfResolutions 7)
(ImagePyramidSchedule 64 64 32 32 16 16 8 8 4 4 2 2 1 1 )
(MaximumNumberOfIterations 1000)
(MaximumStepLength 0.05)
(NumberOfSpatialSamples 200000)
(NewSamplesEveryIteration "true")
(ImageSampler "Random")
(BSplineInterpolationOrder 1)
(FinalBSplineInterpolationOrder 3)
(DefaultPixelValue 0)
(WriteResultImage "true")
(ResultImagePixelType "unsigned short")
(ResultImageFormat "tif")
```

BSpline
```
(FixedInternalImagePixelType "float")
(MovingInternalImagePixelType "float")
(Registration "MultiResolutionRegistration")
(Interpolator "BSplineInterpolator")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(Transform "AffineTransform")
(Metric "AdvancedMattesMutualInformation")
(NumberOfHistogramBins 64)
(Optimizer "AdaptiveStochasticGradientDescent")
(MaximumNumberOfIterations 500)
(MaximumStepLength 0.05)
(NumberOfSpatialSamples 100000)
(FixedImagePyramid "FixedSmoothingImagePyramid")
(MovingImagePyramid "MovingSmoothingImagePyramid")
(NumberOfResolutions 5)
(UseDirectionCosines "true")
(ImageSampler "Random")
(ResultImagePixelType "unsigned char")
(ResultImageFormat "tif")
```

[elastix.log](https://github.com/user-attachments/files/25242178/elastix.log)

Also In the manual, I don't see any options for output compression (result.0.tiff 18GB from affine is too big).
Are there compression options?
Can I have some recommendations if my current parameters need adjustments?

Best,
Andy

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.