<div dir="ltr">Thanks Dzenan. I actually use OrigenX and OrigenY to assign it to the DCM tags. Just curious, how did you compile to use with Slicer?</div><br><div class="gmail_quote"><div dir="ltr">El jue., 13 de abr. de 2017 a la(s) 12:14, Dženan Zukić [via ITK - Users] <<a href="/user/SendEmail.jtp?type=node&node=38121&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> escribió:<br></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Matias,</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">you are not using origenX or origenY after they are defined. But your program (with modifications to make it compile) works for me:</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><img src="http://itk-users.7.n7.nabble.com/attachment/38116/0/Screenshot%202017-04-13%2011.09.11.jpg" alt="Inline image 1" width="528" height="562"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><div dir="ltr"><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"><font face="verdana, sans-serif">Dženan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)</font></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 8, 2017 at 6:08 PM, Matias <span dir="ltr"><<a href="http:///user/SendEmail.jtp?type=node&node=38116&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br>Hi,
I'm rotating a volume (Using the Euler3DTransform) and the final set of slices are half black or empty.
here's an example when rotating a volume of 10 slices:
Am I missing something such as changing the origin or maybe computing the center incorrectly? (The center is passed as parameter from another program)
<img src="http://itk-users.7.n7.nabble.com/file/n38081/capture.jpg" border="0">
And here's the code I'm using:
typedef itk::ResampleImageFilter<ImageType, ImageType> FilterType;
FilterType::Pointer FiltroResample = FilterType::New();
FiltroResample->SetInput(reader->GetOutput());
typedef itk::LinearInterpolateImageFunction<ImageType, double > InterpolatorType;
InterpolatorType::Pointer interpolator = InterpolatorType::New();
FiltroResample->SetInterpolator(interpolator);
FiltroResample->SetOutputDirection(inputImage->GetDirection());
FiltroResample->SetOutputOrigin(inputImage->GetOrigin());
ImageType::SizeType inputSize = inputImage->GetLargestPossibleRegion().GetSize();
FiltroResample->SetSize(inputSize);
const ImageType::SpacingType& inputSpacing = inputImage->GetSpacing();
FiltroResample->SetOutputSpacing(inputSpacing);
FiltroResample->SetDefaultPixelValue(-1000);
typedef itk::Euler3DTransform< double > TransformType; //Transform
TransformType::Pointer transform = TransformType::New();
double alfa, beta, gamma, centro_rotacion_X, centro_rotacion_Y, centro_rotacion_Z, origenX,origenY;
gamma = atof(argv[2]);
beta = atof(argv[3]);
alfa = atof(argv[4]);
centro_rotacion_X = atof(argv[5]);
centro_rotacion_Y = atof(argv[6]);
centro_rotacion_Z = atof(argv[7]);
origenX = atof(argv[8]);
origenY = atof(argv[9]);
transform->SetRotation(gamma, beta, alfa);
double centro[3] = { centro_rotacion_X, centro_rotacion_Y, centro_rotacion_Z };
transform->SetCenter(centro);
FiltroResample->SetTransform(transform);
FiltroResample->Update();
<br><hr align="left" width="300">
View this message in context: <a href="http://itk-users.7.n7.nabble.com/Rotating-image-results-in-last-slices-being-half-empty-tp38081.html" rel="nofollow" link="external" target="_blank">Rotating image results in last slices being half empty</a><br>
Sent from the <a href="http://itk-users.7.n7.nabble.com/" rel="nofollow" link="external" target="_blank">ITK - Users mailing list archive</a> at Nabble.com.<br><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="nofollow" link="external" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>
<br>_____________________________________
<br>Powered by <a href="http://www.kitware.com" target="_blank" rel="nofollow" link="external">www.kitware.com</a>
<br><br>Visit other Kitware open-source projects at
<br><a href="http://www.kitware.com/opensource/opensource.html" rel="nofollow" link="external" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:
<br><a href="http://www.kitware.com/products/protraining.php" rel="nofollow" link="external" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:
<br><a href="http://www.itk.org/Wiki/ITK_FAQ" rel="nofollow" link="external" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:
<br><a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="nofollow" link="external" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br>
<br>
<hr noshade size="1" color="#cccccc">
<div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
<div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
<a href="http://itk-users.7.n7.nabble.com/Rotating-image-results-in-last-slices-being-half-empty-tp38081p38116.html" target="_blank" rel="nofollow" link="external">http://itk-users.7.n7.nabble.com/Rotating-image-results-in-last-slices-being-half-empty-tp38081p38116.html</a>
</div>
<div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
To unsubscribe from Rotating image results in last slices being half empty, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
<a href="http://itk-users.7.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
</div></blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr">Matias</div></div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://itk-users.7.n7.nabble.com/Rotating-image-results-in-last-slices-being-half-empty-tp38081p38121.html">Re: [ITK-users] Rotating image results in last slices being half empty</a><br/>
Sent from the <a href="http://itk-users.7.n7.nabble.com/">ITK - Users mailing list archive</a> at Nabble.com.<br/>