[Insight-users] 3D Registration of two volumes

Aya El Gebeely aya.elgebeely at symbyo.com
Mon Mar 8 02:51:39 EST 2010


Dear All,

I'm trying to register a 3D volume of a dental scan prosthesis to be mapped
on patient scan 3D volume, by taking landmarks from both the scan prosthesis
(moving image) and from the patient (fixed image), I've used
itk::VersorRigid3DTransform, where I get the translation and rotation from
the transform, after looping on each landmark and transform moving point to
fixed point..

The output transformation matrix does not map the two volumes correctly..

Taking into consideration that landMarks were taken from axial view of dicom
data, that 3D volume was generated from , also I've used Open Inventor
SbMatrix to initialize transformation 4*4 matrix

*Pipeline is as follow:*

typedef itk::VersorRigid3DTransform<double> TransformType;
    TransformType::Pointer transform;

 transform= TransformType::New();

 typedef itk::LandmarkBasedTransformInitializer<
TransformType,FixedImageType, MovingImageType > TransformInitializerType;
    TransformInitializerType::Pointer initializer;

initializer= TransformInitializerType::New();

TransformInitializerType::LandmarkPointContainer  fixedLandmarks;
    TransformInitializerType::LandmarkPointContainer movingLandmarks;
    TransformInitializerType::LandmarkPointType m_point;

initializer->SetFixedLandmarks(fixedLandmarks);
    initializer->SetMovingLandmarks(movingLandmarks);
    initializer->SetTransform( transform );
    initializer->InitializeTransform();

    TransformInitializerType::PointsContainerConstIterator  fitr =
fixedLandmarks.begin(); //Fixed points iterator
    TransformInitializerType::PointsContainerConstIterator  mitr =
movingLandmarks.begin();// Moving points iterator

    typedef TransformInitializerType::OutputVectorType  OutputVectorType;

    while( mitr != movingLandmarks.end() )
    {
        transform->TransformPoint( *fitr );

        ++mitr;
        ++fitr;
    }


    OutputVectorType outputVec= transform->GetTranslation();

VersorType myversor= transform->GetVersor();

SbMatrix transformMatrix;

    SbRotation rotation;

    SbVec3f axis;
    axis[0]=myversor.GetAxis()[0];
    axis[1]=myversor.GetAxis()[1];
    axis[2]=myversor.GetAxis()[2];

    double x= myversor.GetScalar();
    SbVec3f scaler;
    scaler[0]=x;
    scaler[1]=x;
    scaler[2]=x;

   rotation.setValue(axis,(float)(myversor.GetAngle()));

    transformMatrix.setTransform(translation, rotation,scaler );


    return transformMatrix;

I want to know if the problem from the pipeline, the input , the way I
initialize the output SbMatrix, or I'm using the wrong type of
registration..

Thanks a lot
Aya R.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100308/a4b581ac/attachment.htm>


More information about the Insight-users mailing list