Closed N-Dekker closed 3 days ago
@stefanklein A related topic: BeforeEachResolution()
does:
https://github.com/SuperElastix/elastix/blob/764490d5e37de792fea4340fc11850bfd067318d/src/Components/Metrics/SumOfPairwiseCorrelationsMetric/elxSumOfPairwiseCorrelationCoefficientsMetric.hxx#L111-L116
So: if the current transform is a stack transform, call SetTransformIsStackTransform(true)
. But what else? There is no else
part. Is that OK? What if a previous transform was a stack transform, but the current transform is not? Should it not call SetTransformIsStackTransform(false)
?
Looking at commit 764490d5e37de792fea4340fc11850bfd067318d "Add: Added PCAMetric, PCAMetric2 and SumOfPairwiseCorrelationCoefficientsMetric to trunkpublic", Wyke Huizinga (@whuizinga), Nov 24, 2015, it appear that the
TransformIsStackTransform
property ofSumOfPairwiseCorrelationCoefficientsMetric
is always true. It is initialized bytrue
in the default-constructor of the metric:https://github.com/SuperElastix/elastix/blob/764490d5e37de792fea4340fc11850bfd067318d/src/Components/Metrics/SumOfPairwiseCorrelationsMetric/itkSumOfPairwiseCorrelationCoefficientsMetric.hxx#L33
And then it may be set
true
, by callingSetTransformIsStackTransform(true)
, inBeforeEachResolution()
:https://github.com/SuperElastix/elastix/blob/764490d5e37de792fea4340fc11850bfd067318d/src/Components/Metrics/SumOfPairwiseCorrelationsMetric/elxSumOfPairwiseCorrelationCoefficientsMetric.hxx#L116
However, it is never
false
. Is it means to be like that?Note that other metrics (PCAMetric, PCAMetric2, VarianceOverLastDimension) have a similar
TransformIsStackTransform
property, but those are initialized tofalse
, during the construction of those metrics.