<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">I didn't compile to use with Slicer. I only open the input and output image in Slicer to visualize them.</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">But making a Slicer CLI module is fairly easy. You can take a look at <a href="https://github.com/Slicer/Slicer/tree/master/Modules/CLI/AddScalarVolumes/">one</a> of the existing modules, <a href="https://www.slicer.org/wiki/Documentation/Nightly/Developers/Modules">docs</a> including <a href="https://www.slicer.org/wiki/Documentation/Nightly/Developers/ExtensionWizard">extension wizard</a>.</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 Fri, Apr 14, 2017 at 12:26 PM, Matias <span dir="ltr"><<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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"><span class=""><div dir="ltr">El jue., 13 de abr. de 2017 a la(s) 12:14, Dženan Zukić [via ITK - Users] <<a href="http:///user/SendEmail.jtp?type=node&node=38121&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>> escribió:<br></div></span><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><span class="">

        <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></span><div><div class="h5"><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<<wbr>ImageType, ImageType> FilterType;
                FilterType::Pointer FiltroResample = FilterType::New();
                FiltroResample->SetInput(<wbr>reader->GetOutput());

                typedef itk::<wbr>LinearInterpolateImageFunction<wbr><ImageType, double > InterpolatorType;
                InterpolatorType::Pointer interpolator = InterpolatorType::New();
                FiltroResample-><wbr>SetInterpolator(interpolator);
                FiltroResample-><wbr>SetOutputDirection(inputImage-<wbr>>GetDirection());
                FiltroResample-><wbr>SetOutputOrigin(inputImage-><wbr>GetOrigin());

                ImageType::SizeType inputSize = inputImage-><wbr>GetLargestPossibleRegion().<wbr>GetSize();
                FiltroResample->SetSize(<wbr>inputSize);

                const ImageType::SpacingType& inputSpacing = inputImage->GetSpacing();
                FiltroResample-><wbr>SetOutputSpacing(inputSpacing)<wbr>;

                FiltroResample-><wbr>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(<wbr>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>______________________________<wbr>_______<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/<wbr>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/<wbr>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_<wbr>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/<wbr>mailman/listinfo/insight-users</a><br>
<br></div></div></div></div></blockquote></div><div><div class="h5"><br>
<br>______________________________<wbr>_______
<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/<wbr>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/<wbr>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_<wbr>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/<wbr>mailman/listinfo/insight-users</a><br>

        
        
        
        <br>
        <br>
        </div></div><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" rel="nofollow" link="external" target="_blank">http://itk-users.7.n7.nabble.<wbr>com/Rotating-image-results-in-<wbr>last-slices-being-half-empty-<wbr>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 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" link="external" target="_blank">NAML</a><span class="HOEnZb"><font color="#888888">
        </font></span></div><span class="HOEnZb"><font color="#888888"><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" target="_blank">Re: [ITK-users] Rotating image results in last slices being half empty</a></font></span><div class="HOEnZb"><div class="h5"><br>
Sent from the <a href="http://itk-users.7.n7.nabble.com/" target="_blank">ITK - Users mailing list archive</a> at Nabble.com.<br></div></div><br>______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" 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="noreferrer" target="_blank">http://www.kitware.com/<wbr>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="noreferrer" target="_blank">http://www.kitware.com/<wbr>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="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>