[Insight-users] question about a mapping obtained from combining a bulk affine transform with a deformable registration

John Drozd john.drozd at gmail.com
Mon Nov 9 16:59:45 EST 2009


Hello,

I successfully combined an 3D affine transform (as a result of a 3D centred
affine registration "ImageRegistration9revised.cxx" ), and then I fed this
in as a bulk affine transform to be used with a deformable transformation to
register two different subject dicom mri 3d images from two different
people. In both cases I used a Mattes Mutual Information metric for
multi-modality registration.

I have my original fixed image which I am using as an atlas and my original
moving image which is my brain subject. In the code I obtained the mapping
of specific points in the brain ventricles from the fixed image atlas to the
moving image brain subject as per the code snippet  below (*I have also
attached to this email the affine and deformable registration ".cxx" files
and affine transform ".tfm" file*):

*My confusion is, that I am wondering in reference to this "mapping from a
point in the fixed image to a point in the moving image":  Is this mapped
point a point in the moving image in its original unaltered state, or is the
mapped point a point in the moving image in a state that has had the bulk
affine transform applied to it, or is the mapped point a point in the moving
image in a state that has had the bulk affine transform and deformation
applied to it?*

CODE SNIPPET BELOW:
// Generate the explicit deformation field resulting from the registration.
  if( argc > 6 )
    {

    typedef itk::Vector< float, ImageDimension >  VectorType;
    typedef itk::Image< VectorType, ImageDimension >  DeformationFieldType;

    DeformationFieldType::Pointer field = DeformationFieldType::New();
    field->SetRegions( fixedRegion );
    field->SetOrigin( fixedImage->GetOrigin() );
    field->SetSpacing( fixedImage->GetSpacing() );
    field->SetDirection( fixedImage->GetDirection() );
    field->Allocate();

    typedef itk::ImageRegionIterator< DeformationFieldType > FieldIterator;
    FieldIterator fi( field, fixedRegion );

    fi.GoToBegin();

    TransformType::InputPointType  fixedPoint;
    TransformType::OutputPointType movingPoint;
    DeformationFieldType::IndexType index;

    VectorType displacement;

    while( ! fi.IsAtEnd() )
      {
      index = fi.GetIndex();
      field->TransformIndexToPhysicalPoint( index, fixedPoint );

      movingPoint = transform->TransformPoint( fixedPoint );

      displacement = movingPoint - fixedPoint;
      fi.Set( displacement );
      ++fi;
      }

    //added by jd
    TransformType::InputPointType  fixedPoint2;
    TransformType::OutputPointType movingPoint2;

    //picked a point in right ventricle in atlas (fixed subject)
    fixedPoint2[0] = 299.6;
    fixedPoint2[1] = 138.7;
    fixedPoint2[2] = -104.9;

    movingPoint2 = transform->TransformPoint( fixedPoint2 );

    std::cout << "fixedPoint2[0] = " << fixedPoint2[0] << std::endl;
    std::cout << "fixedPoint2[1] = " << fixedPoint2[1] << std::endl;
    std::cout << "fixedPoint2[2] = " << fixedPoint2[2] << std::endl <<
std::endl;

    std::cout << "movingPoint2[0] = " << movingPoint2[0] << std::endl;
    std::cout << "movingPoint2[1] = " << movingPoint2[1] << std::endl;
    std::cout << "movingPoint2[2] = " << movingPoint2[2] << std::endl;

Thanks,
john
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091109/3098c6bf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ImageRegistration9revised.cxx
Type: text/x-c++src
Size: 25614 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091109/3098c6bf/attachment-0002.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeformableRegistration8revised.cxx
Type: text/x-c++src
Size: 26342 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091109/3098c6bf/attachment-0003.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AffineTransformsub1sub4.tfm
Type: application/octet-stream
Size: 245 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091109/3098c6bf/attachment-0001.obj>


More information about the Insight-users mailing list