<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Vijaya,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">can you re-post this question on the <a href="https://discourse.itk.org/" target="_blank">forum</a>? We have migrated away from the mailing list.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Sep 9, 2018 at 3:53 PM Vijaya Ghorpade <<a href="mailto:rickfisher777@aol.com" target="_blank">rickfisher777@aol.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="" size="2" face="Helvetica Neue">Hello<font face="Arial, Helvetica, sans-serif"> Dzenan</font>
<div><font face="Arial, Helvetica, sans-serif">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.</font></div>

<div><font face="Arial, Helvetica, sans-serif">
<div><b style="background-color:yellow">EulerTransformType::Pointer transform_pixel2 = EulerTransformType::New();</b></div>

<div><b style="background-color:yellow">   EulerTransformType::ParametersType transform_pixel(6);</b></div>

<div><b style="background-color:yellow">   EulerTransformType::ParametersType fixedParameters(3);</b></div>

<div><b style="background-color:yellow">   double centro[3]={out.GetIndex()[0]*spaceorgan[0],out.GetIndex()[1]*spaceorgan[1],out.GetIndex()[2]*spaceorgan[2]};</b></div>

<div><b style="background-color:yellow">   transform_pixel2->SetCenter(centro);</b></div>

<div><b style="background-color:yellow">   std::cout<<"vResultUnit[0]"<<vResultUnit[0]* (180.0 / PI)<<std::endl;</b></div>

<div><b style="background-color:yellow">   std::cout<<"vResultUnit[1]"<<vResultUnit[1]* (180.0 / PI)<<std::endl;</b></div>

<div><b style="background-color:yellow">   std::cout<<"vResultUnit[2]"<<vResultUnit[2]* (180.0 / PI)<<std::endl;</b></div>

<div><b style="background-color:yellow"><br>
</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>transform_pixel[0]=(vResultUnit[0]);//* (180.0 / PI);</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>transform_pixel[1]=(vResultUnit[1]);//* (180.0 / PI);</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>transform_pixel[2]=(vResultUnit[2]);//* (180.0 / PI);</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>transform_pixel[3]=2*spaceorgan[0];</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>transform_pixel[4]=2*spaceorgan[1];</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>transform_pixel[5]=2*spaceorgan[2];</b></div>

<div><b style="background-color:yellow">   <span style="white-space:pre-wrap">  </span>fixedParameters[0] = out.GetIndex()[0]*spaceorgan[0];</b></div>

<div><b style="background-color:yellow">    fixedParameters[1] = out.GetIndex()[1]*spaceorgan[1];</b></div>

<div><b style="background-color:yellow">    fixedParameters[2] = out.GetIndex()[2]*spaceorgan[2];</b></div>

<div><b style="background-color:yellow">   // std::cout<<"out.GetIndex()  "<<out.GetIndex()<<std::endl;</b></div>

<div><b style="background-color:yellow"><br>
</b></div>

<div><b style="background-color:yellow">    transform_pixel2->SetParameters(transform_pixel);</b></div>

<div><b style="background-color:yellow">    transform_pixel2->SetFixedParameters(fixedParameters);</b></div>

<div><br>
</div>

<div>
<div><span style="background-color:lightcoral"> <b>using InterpolatorType_Image = itk::NearestNeighborInterpolateImageFunction<FixedImageType, double>;</b></span></div>

<div><b style="background-color:lightcoral">    InterpolatorType_Image::Pointer Imageinterpolator = InterpolatorType_Image::New();</b></div>

<div><b style="background-color:lightcoral">    ResampleImageFilterType::Pointer resample_pixelTrans = ResampleImageFilterType::New();</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetTransform(transform_pixel2.GetPointer());</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetInterpolator(Imageinterpolator);</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetInput(FixedImage_duplicate);</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetSize(FixedImage_organ->GetLargestPossibleRegion().GetSize());</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetOutputOrigin(FixedImage_organ->GetOrigin());</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetOutputSpacing(FixedImage_organ->GetSpacing());</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->SetOutputDirection(FixedImage_organ->GetDirection());</b></div>

<div><b style="background-color:lightcoral">    resample_pixelTrans->Update();</b></div>
</div>
</font><br>
<br>

<div style="font-family:arial,helvetica;font-size:10pt;color:black">
<div class="m_6282998391414434631m_2249451320699395155aolmail_wmstd_quote">
<div>-----Original Message-----<br>
From: Dženan Zukić <<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>><br>
To: rickfisher777 <<a href="mailto:rickfisher777@aol.com" target="_blank">rickfisher777@aol.com</a>><br>
Cc: Insight-users <<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>><br>
Sent: Fri, Sep 7, 2018 10:10 pm<br>
Subject: Re: [ITK-users] 3D rigid transform<br>
<br>

<div id="m_6282998391414434631m_2249451320699395155yiv3907615148">
<div>
<div dir="ltr">
<div dir="ltr">
<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Vijaya,</div>

<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br clear="none"></div>

<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_default" style="font-family:verdana,sans-serif;font-size:small">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 <a rel="noopener noreferrer" shape="rect" href="https://itk.org/Doxygen/html/classitk_1_1Euler3DTransform.html" target="_blank">Euler</a>, <a rel="noopener noreferrer" shape="rect" href="https://itk.org/Doxygen/html/classitk_1_1QuaternionRigidTransform.html" target="_blank">Quat</a> and <a rel="noopener noreferrer" shape="rect" href="https://itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html" target="_blank">Versor</a> rigid 3D transforms. More transform types are listed <a rel="noopener noreferrer" shape="rect" href="https://itk.org/Doxygen/html/group__ITKTransform.html" target="_blank">here</a>. This <a rel="noopener noreferrer" shape="rect" href="https://itk.org/ITKExamples/src/Filtering/ImageGrid/ResampleAnImage/Documentation.html" target="_blank">example</a>, and this <a rel="noopener noreferrer" shape="rect" href="https://itk.org/Wiki/ITK/Examples/SimpleOperations/TranslationTransform" target="_blank">example</a> might help you about how to set parameters and use a transform.</div>

<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br clear="none"></div>

<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div>

<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div>
</div>
</div>
<br clear="none">
<div class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_quote">
<div class="m_6282998391414434631m_2249451320699395155yiv3907615148yqt6270554914" id="m_6282998391414434631m_2249451320699395155yiv3907615148yqtfd64632">
<div dir="ltr">On Fri, Sep 7, 2018 at 7:30 AM Vijaya Ghorpade via Insight-users <<a rel="noopener noreferrer" shape="rect" href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>> wrote:<br clear="none"></div>
<blockquote class="m_6282998391414434631m_2249451320699395155yiv3907615148gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font color="" size="2" face="Helvetica Neue"><font face="Arial, Helvetica, sans-serif">Hi</font>
</font>
<div><font face="Arial, Helvetica, sans-serif">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. </font></div>



<div><font face="Arial, Helvetica, sans-serif">Thank you so much in advance,</font></div>

The ITK community is transitioning from this mailing list to <a rel="noopener noreferrer" shape="rect" href="http://discourse.itk.org" target="_blank">discourse.itk.org</a>. Please join us there!<br clear="none">
________________________________<br clear="none">
Powered by <a rel="noopener noreferrer" shape="rect" href="http://www.kitware.com" target="_blank">www.kitware.com</a><br clear="none">
<br clear="none">
Visit other Kitware open-source projects at<br clear="none">
<a rel="noopener noreferrer" shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none">
<br clear="none">
Kitware offers ITK Training Courses, for more information visit:<br clear="none">
<a rel="noopener noreferrer" shape="rect" href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br clear="none">
<br clear="none">
Please keep messages on-topic and check the ITK FAQ at:<br clear="none">
<a rel="noopener noreferrer" shape="rect" href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br clear="none">
<br clear="none">
Follow this link to subscribe/unsubscribe:<br clear="none">
<a rel="noopener noreferrer" shape="rect" href="https://itk.org/mailman/listinfo/insight-users" target="_blank">https://itk.org/mailman/listinfo/insight-users</a><br clear="none">
</blockquote></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</font></blockquote></div>