Hi all,<br> how could i apply a rotation arround x axis (1,0,0) forwarded by another rotation arround z axis (0,0,1)?<br> <br> I tried this way but it takes much time!<br> <br> <span style="font-weight: bold; font-style: italic;"> volumefilter = VolumeFilterType::New();</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter2 = VolumeFilterType::New();</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rotation1 = VersorTransformType::New();</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rotation2 = VersorTransformType::New();</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> interpolator = InterpolatorType::New();</span><br
style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><span style="font-weight: bold; font-style: italic;">volumefilter->SetInterpolator( interpolator );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><span style="font-weight: bold; font-style: italic;">volumefilter->SetDefaultPixelValue( 1 );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><span style="font-weight: bold; font-style: italic;">volumefilter2->SetInterpolator( interpolator );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><span style="font-weight: bold; font-style: italic;">volumefilter2->SetDefaultPixelValue( 1 );</span><br style="font-weight: bold; font-style: italic;">
<span style="font-weight: bold; font-style: italic;"> </span><span style="font-weight: bold; font-style: italic;">degreesToRadians = atan(1.0) / 45.0;</span><br style="font-weight: bold; font-style: italic;"> <br> <span style="font-weight: bold; font-style: italic;"> volumefilter->SetOutputOrigin( m_inputimagesorigin );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter->SetOutputSpacing( m_inputimagespacing );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter->SetSize( m_inputimagesize );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;">
volumefilter2->SetOutputOrigin( m_inputimagesorigin );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter2->SetOutputSpacing( m_inputimagespacing );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter2->SetSize( m_inputimagesize );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter->SetInput( m_VolumeReader->GetOutput() );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter2->SetInput( volumefilter->GetOutput() );</span><br style="font-weight: bold; font-style: italic;">
<span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> center[0] = m_inputimagesorigin[0] + m_inputimagespacing[0] * m_inputimagesize[0] / 2.0;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> center[1] = m_inputimagesorigin[1] + m_inputimagespacing[1] * m_inputimagesize[1] / 2.0;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> center[2] = m_inputimagesorigin[2] + m_inputimagespacing[2] * m_inputimagesize[2] / 2.0;</span><br style="font-weight: bold; font-style: italic;"> <br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> axis[0] = 0.0;</span><br style="font-weight: bold; font-style:
italic;"> <span style="font-weight: bold; font-style: italic;"> axis[1] = 0.0;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> axis[2] = 1.0;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> const double angle1 = -PAngleValue[indice] * degreesToRadians;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"></span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rot.Set( axis, angle1 );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rotation1->SetCenter(
center );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rotation1->SetRotation( rot );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter->SetTransform( rotation1 );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> axis[0] = 1.0;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> axis[1] = 0.0;</span><br style="font-weight: bold; font-style: italic;"> <span
style="font-weight: bold; font-style: italic;"> axis[2] = 0.0;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> const double angle3 = -SAngleValue[indice] * degreesToRadians;</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rot.Set( axis, angle3 );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rotation2->SetCenter( center );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> rotation2->SetRotation( rot );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style:
italic;"> </span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter2->SetTransform( rotation2 );</span><br style="font-weight: bold; font-style: italic;"> <span style="font-weight: bold; font-style: italic;"> volumefilter2->Update();<br> <br> </span><span style="font-style: italic;">thx for your time,<br> Regards.</span><span style="font-weight: bold; font-style: italic;"><br> </span><p>
                <hr size=1> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com">Téléchargez</a> la version beta.