[ITK-users] 3D rigid transform

Dženan Zukić dzenanz at gmail.com
Mon Sep 10 09:41:58 EDT 2018


Hi Vijaya,

can you re-post this question on the forum <https://discourse.itk.org/>? We
have migrated away from the mailing list.

Regards,
Dženan

On Sun, Sep 9, 2018 at 3:53 PM Vijaya Ghorpade <rickfisher777 at aol.com>
wrote:

> Hello Dzenan
> I have another question. When I do the resamplin, I don't see the output
> image, it is blank. It works for very small euler angles (assuming
> euler3dtransform takes input in radians). But for larger angles, I dont see
> any output. I have set the center to a particular pixel and index and also
> the fixedparameters to it. I am pasting the script. Please let me know, I
> am sorry to ask you so many questions.
> *EulerTransformType::Pointer transform_pixel2 = EulerTransformType::New();*
> *   EulerTransformType::ParametersType transform_pixel(6);*
> *   EulerTransformType::ParametersType fixedParameters(3);*
> *   double
> centro[3]={out.GetIndex()[0]*spaceorgan[0],out.GetIndex()[1]*spaceorgan[1],out.GetIndex()[2]*spaceorgan[2]};*
> *   transform_pixel2->SetCenter(centro);*
> *   std::cout<<"vResultUnit[0]"<<vResultUnit[0]* (180.0 / PI)<<std::endl;*
> *   std::cout<<"vResultUnit[1]"<<vResultUnit[1]* (180.0 / PI)<<std::endl;*
> *   std::cout<<"vResultUnit[2]"<<vResultUnit[2]* (180.0 / PI)<<std::endl;*
>
> *    transform_pixel[0]=(vResultUnit[0]);//* (180.0 / PI);*
> *    transform_pixel[1]=(vResultUnit[1]);//* (180.0 / PI);*
> *    transform_pixel[2]=(vResultUnit[2]);//* (180.0 / PI);*
> *    transform_pixel[3]=2*spaceorgan[0];*
> *    transform_pixel[4]=2*spaceorgan[1];*
> *    transform_pixel[5]=2*spaceorgan[2];*
> *    fixedParameters[0] = out.GetIndex()[0]*spaceorgan[0];*
> *    fixedParameters[1] = out.GetIndex()[1]*spaceorgan[1];*
> *    fixedParameters[2] = out.GetIndex()[2]*spaceorgan[2];*
> *   // std::cout<<"out.GetIndex()  "<<out.GetIndex()<<std::endl;*
>
> *    transform_pixel2->SetParameters(transform_pixel);*
> *    transform_pixel2->SetFixedParameters(fixedParameters);*
>
>  *using InterpolatorType_Image =
> itk::NearestNeighborInterpolateImageFunction<FixedImageType, double>;*
> *    InterpolatorType_Image::Pointer Imageinterpolator =
> InterpolatorType_Image::New();*
> *    ResampleImageFilterType::Pointer resample_pixelTrans =
> ResampleImageFilterType::New();*
> *    resample_pixelTrans->SetTransform(transform_pixel2.GetPointer());*
> *    resample_pixelTrans->SetInterpolator(Imageinterpolator);*
> *    resample_pixelTrans->SetInput(FixedImage_duplicate);*
> *
> resample_pixelTrans->SetSize(FixedImage_organ->GetLargestPossibleRegion().GetSize());*
> *    resample_pixelTrans->SetOutputOrigin(FixedImage_organ->GetOrigin());*
> *
> resample_pixelTrans->SetOutputSpacing(FixedImage_organ->GetSpacing());*
> *
> resample_pixelTrans->SetOutputDirection(FixedImage_organ->GetDirection());*
> *    resample_pixelTrans->Update();*
>
>
> -----Original Message-----
> From: Dženan Zukić <dzenanz at gmail.com>
> To: rickfisher777 <rickfisher777 at aol.com>
> Cc: Insight-users <insight-users at itk.org>
> Sent: Fri, Sep 7, 2018 10:10 pm
> Subject: Re: [ITK-users] 3D rigid transform
>
> Hi Vijaya,
>
> Fixed parameters are not optimized when a transform is used in image
> registration. Center of rotation is usually the fixedparameter. That is the
> case with Euler
> <https://itk.org/Doxygen/html/classitk_1_1Euler3DTransform.html>, Quat
> <https://itk.org/Doxygen/html/classitk_1_1QuaternionRigidTransform.html> and
> Versor
> <https://itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html> rigid
> 3D transforms. More transform types are listed here
> <https://itk.org/Doxygen/html/group__ITKTransform.html>. This example
> <https://itk.org/ITKExamples/src/Filtering/ImageGrid/ResampleAnImage/Documentation.html>,
> and this example
> <https://itk.org/Wiki/ITK/Examples/SimpleOperations/TranslationTransform> might
> help you about how to set parameters and use a transform.
>
> Regards,
> Dženan
>
> On Fri, Sep 7, 2018 at 7:30 AM Vijaya Ghorpade via Insight-users <
> insight-users at itk.org> wrote:
>
> Hi
> Before asking this question I searched the whole archive. I am new here.
> I would like to resample an MRI image after applying 3D rigid transform
> (Rotation followed by translation). I found euler3dtransform and
> quaternion3d. The documentation is not suffice to see how to use it
> completely. What are parameters and fixed parameters. How to give suppose
> three angles a, b, c and 3 transtalations x ,y, z to these functions.
> Please help me.
> Thank you so much in advance,
> The ITK community is transitioning from this mailing list to
> discourse.itk.org. Please join us there!
> ________________________________
> 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:
> https://itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://itk.org/pipermail/insight-users/attachments/20180910/16a26159/attachment.html>


More information about the Insight-users mailing list