[Insight-users] SampleFixedImageDomian in MIImageToImageMetric,
***why mapping fiximage to movImage***
Luis Ibanez
luis.ibanez at kitware.com
Sun Apr 17 18:02:53 EDT 2005
Hi 庄吓海,
The reasons why the ITK transform map the FixedImage coordinates
into the MovingImage coordinates are explained in great detail in
the ITK Software Guide and in the ITK Registration tutorial.
Please read:
http://www.itk.org/ItkSoftwareGuide.pdf
In particular you should look at the chapter on image resampling
and at the image registration chapter.
and read the Registration tutotiral at:
http://www.itk.org/HTML/Tutorials
Please let us know if after reading this material you still
have any remaining questions,
Thanks
Luis
-----------------
庄吓海 wrote:
> insight-users,您好!
>
>
> MutualInformationImageToImageMetric< TFixedImage,TMovingImage>
> ::SampleFixedImageDomain(
> SpatialSampleContainer& samples ) const
> {
> ..............................
> for( iter = samples.begin(); iter != end; ++iter )
> {
> // get sampled index
> FixedImageIndexType index = randIter.GetIndex();
>
> // get sampled fixed image value
> (*iter).FixedImageValue = randIter.Get();
>
> // get moving image value
> m_FixedImage-> TransformIndexToPhysicalPoint( index,
> (*iter).FixedImagePointValue );
>
>
> //here, Transform should taking movImage to fixImage, why here uses
> just the opposite direction.
> MovingImagePointType mappedPoint = m_Transform->
> TransformPoint( (*iter).FixedImagePointValue );
>
>
>
>
>
>
> if( m_Interpolator-> IsInsideBuffer( mappedPoint ) )
> {
> (*iter).MovingImageValue = m_Interpolator-> Evaluate( mappedPoint );
> allOutside = false;
> }
> else
> {
> (*iter).MovingImageValue = 0;//出界点
> }
>
> // jump to random position
> ++randIter;
> }
> if( allOutside )
> {
> // if all the samples mapped to the outside throw an exception
> itkExceptionMacro(< <
> "All the sampled point mapped to outside of the moving image" );
> }
> }
>
> 致
> 礼!
>
> 庄吓海
> arhye at 163.com
> 2005-04-11
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list