[Insight-users] itkMattesMI: LocalSupport Transforms

brian avants stnava at gmail.com
Sat Aug 18 18:13:53 EDT 2012


hi roshni

short answer --- i hope to flesh out these details some time in the
next few months.

in the mean time, you may be right but i don't really follow your
reasoning.   surely, this is my lack of looking at the code.

did you read the mattes paper?  some relevant assumptions are explained there.

now that you are familiar with the code, you may try out your
suggestions and let us know how it goes.

thanks again for looking into this ---

brian




On Sat, Aug 18, 2012 at 5:33 PM, Roshni <roshni.b at gmail.com> wrote:
> Hi Brian,
>
> Thanks for your response, but I still have some questions:
>
> Consider a local support transform with parameters \theta = [\theta1,
> \theta2 ... \thetaP].
>
> Then the derivative of each voxel location w.r.t. \|theta will be non zero
> only for a few parameters (due to the local support assumption). However, I
> do not understand how we can get away with "m_LocalDerivativeByParzenBin"
> being of size 4xP. (In
> MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader::BeforeThreadedExecution()
> lines 114-130.)
>
> Is the assumption here that each parameter \theta_p affects only 4 bins in
> the joint & moving-image-marginal PDFs?
> If so, I'm not sure that the assumption holds:
>
> For an arbitrary local support transform, each parameter \theta_p will
> affect all voxels within its region of interest (ROI). So, for instance, if
> the ROI for \theta_p has 2 voxels v_i and v_j, such that v_i contributes to
> bins [k1 k2 k3 k4] and v_j contributes to [k3 k4 k5 k6] in the
> moving-image-marginal PDF, then the derivatives of the joint and marginal
> PDFs w.r.t \theta_p will be non-zero at at-least all six bins [k1 k2 k3 ..
> k6].
>
> Along the same lines, I do not follow how all the results are combined in
> the
> MattesMutualInformationImageToImageMetricv4::ComputeResults() function:
>
> // Apply the pRatio and sum the per-window derivative
>   // contributions, in the local-support case.
>   if( this->m_ComputeDerivative )
>     {
>     if( this->HasLocalSupport() )
>       {
>       for( SizeValueType i = 0; i < this->m_DerivativeResult->Size(); i++ )
>         {
>         for( SizeValueType bin = 0; bin < 4; bin++ )
>           {
>           // Increment the m_JointPdfIndex1DArray index by bin in order to
> recover
>           // the pRatio at the moving indecies used for each portion of the
> derivative.
>           // Note: in old v3 metric ComputeDerivatives,
> derivativeContribution is subtracted in global case,
>           // but added in "local" (implicit) case. These operations have
> been switched to minimize the metric.
>           SizeValueType pRatioIndex = this->m_JointPdfIndex1DArray[i] + bin;
>           (*(this->m_DerivativeResult))[i] -=
> m_LocalDerivativeByParzenBin[bin][i] * this->m_PRatioArray[pRatioIndex];
>           }
>         }
>       }
>     }
>
> Here again the assumption seems to be that for the "i"th parameter \theta_i,
> only 4 bins are affected and hence only the bin-specific weighting of those
> bins is multiplied before adding the results.
>
> IMHO, m_PRatioArray[][] should be pre-computed and then the derivative
> contributions should be multiplied with the appropriate values before being
> added.
>
> That is,  in
> MattesMutualInformationImageToImageMetricv4GetValueAndDerivativeThreader::ComputePDFDerivatives()
> (lines 373-377)
>
> on line 375:
> *( localSupportDerivativeResultPtr ) +=
> derivativeContribution*m_PRatioArray[fixedImageParzenWindowIndex][pdfMovingIndex]
> ;
> in place of  *( localSupportDerivativeResultPtr ) += derivativeContribution;
>
> Does this make sense or am I missing something completely?
> Please let me know what you think.
>
> Thanks,
> Roshni
>
>
>
> On Sat, Aug 18, 2012 at 12:46 PM, brian avants <stnava at gmail.com> wrote:
>>
>> hi R
>>
>> yes, a local support transformation only needs a few of the parameters
>> to define a transformation of a given point.    for instance,  the
>> transformation of a point by a discrete displacement field is
>> determined by a small local neighborhood of information.   for
>> transformations of this type, the derivative of a specific parameter
>> only depends upon the support or the local neighborhood that affects
>> it.   one of the main changes in v4 is that you can use the same
>> metros for both local and global support transformations.   the Mattes
>> MI metric originated from this paper:
>>
>>  "PET-CT Image Registration in the Chest Using Free-form Deformations"
>> D. Mattes, D. R. Haynor, H. Vesselle, T. Lewellen and W. Eubank IEEE
>> Transactions in Medical Imaging. Vol.22, No.1, January 2003.
>> pp.120-128
>>
>> but much has changed in the implementation since then and there is
>> currently no technical paper that accurately describes what's being
>> done, in particular for the local support case.   however, the basic
>> idea is as described above:  just compute the local derivative if your
>> transform has local support.
>>
>> hope this helps,
>>
>> brian
>>
>>
>>
>>
>> On Fri, Aug 17, 2012 at 8:51 PM, Roshni <roshni.b at gmail.com> wrote:
>> > Hi,
>> >
>> > I am trying to modify "itkMattesMutualInformationMetricv4" but am having
>> > trouble following the logic behind the derivative computations when a
>> > "local
>> > support" transformation is used.
>> > Please could someone explain the basic ideas used?
>> >
>> > Also, do local support transforms imply dense transformations with local
>> > support basis functions, e.g. BSpline deformations?
>> > Please help!
>> >
>> > Thanks much,
>> > R
>> >
>> >
>> > _____________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Kitware offers ITK Training Courses, for more information visit:
>> > http://www.kitware.com/products/protraining.php
>> >
>> > Please keep messages on-topic and check the ITK FAQ at:
>> > http://www.itk.org/Wiki/ITK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>
>


More information about the Insight-users mailing list