<div dir="ltr"><span style="font-size:12.8px">Subject: what is the best way to do TriangleMeshToBinaryImageFilter on a region</span><br style="font-size:12.8px"><span style="font-size:12.8px">I want to show a small local mesh in a big volume, but I encounter following</span><br style="font-size:12.8px"><span style="font-size:12.8px">issue</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">when  Info Image is big (meshCastFilter->SetInfoImage(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">meshVisualInfor) =</span><br style="font-size:12.8px"><span style="font-size:12.8px">512x512x1300)  even the mesh is a small locally generated mesh (100x50x50),</span><br style="font-size:12.8px"><span style="font-size:12.8px">the TriangleMeshToBinaryImageFilte</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">r   filter take ~1 second to finish.</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">If try following ExtractImageFilter code to get a small region of original</span><br style="font-size:12.8px"><span style="font-size:12.8px">full volume (meshVisualInfor) TriangleMeshToBinaryImageFilte</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">r  will crash at</span><br style="font-size:12.8px"><span style="font-size:12.8px">m_InfoImage->Update();</span><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">Is there good way to do regional TriangleMeshToBinaryImageFilte</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">r ?</span><br style="font-size:12.8px"><span style="font-size:12.8px">Thanks and happy 2017!</span><br style="font-size:12.8px"><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">typedef itk::ExtractImageFilter< OutputImageType, OutputImageType ></span><br style="font-size:12.8px"><span style="font-size:12.8px">ExtractImageFilter;</span><br style="font-size:12.8px"><span style="font-size:12.8px">ExtractImageFilter::Pointer roifilter = ExtractImageFilter::New();</span><br style="font-size:12.8px"><span style="font-size:12.8px">roifilter-></span><wbr style="font-size:12.8px"><span style="font-size:12.8px">SetDirectionCollapseToSubmatri</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">x();</span><br style="font-size:12.8px"><span style="font-size:12.8px">roifilter->SetInput(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">meshVisualInfor);</span><br style="font-size:12.8px"><span style="font-size:12.8px">roifilter-></span><wbr style="font-size:12.8px"><span style="font-size:12.8px">SetExtractionRegion(region);</span><br style="font-size:12.8px"><span style="font-size:12.8px">roifilter->Update();</span><br style="font-size:12.8px"><span style="font-size:12.8px">meshCastFilter->SetInfoImage(</span><wbr style="font-size:12.8px"><span style="font-size:12.8px">roifilter->GetOutput()); //meshVisualInfor work</span><br style="font-size:12.8px"><span style="font-size:12.8px">but take ~1 second</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 31, 2016 at 10:55 AM,  <span dir="ltr"><<a href="mailto:insight-users-owner@itk.org" target="_blank">insight-users-owner@itk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You are not allowed to post to this mailing list, and your message has<br>
been automatically rejected. This mailing list requires subscription<br>
before you can post any messages. For subscription information, go to:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://www.itk.org/mailman/<wbr>listinfo/insight-users</a><br>
<br>
If you think that your messages are being rejected in error, contact<br>
the mailing list owner at <a href="mailto:insight-users-owner@itk.org">insight-users-owner@itk.org</a>.<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Leon Tan <<a href="mailto:magicimaging@gmail.com">magicimaging@gmail.com</a>><br>To: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Cc: <br>Date: Sat, 31 Dec 2016 08:55:26 -0700 (MST)<br>Subject: what is the best way to do TriangleMeshToBinaryImageFilter  on a region<br>I want to show a small local mesh in a big volume, but I encounter following<br>
issue<br>
<br>
when  Info Image is big (meshCastFilter->SetInfoImage(<wbr>meshVisualInfor) =<br>
512x512x1300)  even the mesh is a small locally generated mesh (100x50x50),<br>
the TriangleMeshToBinaryImageFilte<wbr>r   filter take ~1 second to finish.<br>
<br>
If try following ExtractImageFilter code to get a small region of original<br>
full volume (meshVisualInfor) TriangleMeshToBinaryImageFilte<wbr>r  will crash at<br>
m_InfoImage->Update();<br>
<br>
Is there good way to do regional TriangleMeshToBinaryImageFilte<wbr>r ?<br>
Thanks and happy 2017!<br>
<br>
<br>
typedef itk::ExtractImageFilter< OutputImageType, OutputImageType ><br>
ExtractImageFilter;<br>
ExtractImageFilter::Pointer roifilter = ExtractImageFilter::New();<br>
roifilter-><wbr>SetDirectionCollapseToSubmatri<wbr>x();<br>
roifilter->SetInput(<wbr>meshVisualInfor);<br>
roifilter-><wbr>SetExtractionRegion(region);<br>
roifilter->Update();<br>
meshCastFilter->SetInfoImage(<wbr>roifilter->GetOutput()); //meshVisualInfor work<br>
but take ~1 second<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/what-is-the-best-way-to-do-TriangleMeshToBinaryImageFilter-on-a-region-tp7589525.html" rel="noreferrer" target="_blank">http://itk-insight-users.<wbr>2283740.n2.nabble.com/what-is-<wbr>the-best-way-to-do-<wbr>TriangleMeshToBinaryImageFilte<wbr>r-on-a-region-tp7589525.html</a><br>
Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
<br></blockquote></div><br></div>