[ITK] [ITK-users] what is the best way to do TriangleMeshToBinaryImageFilter on a region
Young Lee
questionleon at gmail.com
Mon Jan 2 09:09:27 EST 2017
Thanks for Dženan's suggestion, I tried RegionOfInterestImageFilter but
still crash. Looks like there is a bug and following code in
itkTriangleMeshToBinaryImageFilter.hxx does not support regional process,
zInc = extent[3] - extent[2] + 1; zInc can be huge as for a region
m_Size[1] - 1 can be < m_Index[1].
Should it be extent[3] = region.GetUpperIndex()[1];
itk4100\Modules\Core\Mesh\include\itkTriangleMeshToBinaryImageFilter.hxx
code
// create a similar extent like vtk
extent[0] = m_Index[0];
extent[1] = m_Size[0] - 1;
extent[2] = m_Index[1];
extent[3] = m_Size[1] - 1;
extent[4] = m_Index[2];
extent[5] = m_Size[2] - 1;
int zInc = extent[3] - extent[2] + 1;
int zSize = extent[5] - extent[4] + 1;
My code to try ROI filter
typedef itk::RegionOfInterestImageFilter< OutputImageType, OutputImageType >
ROIImageFilter;
ROIImageFilter::Pointer roifilter = ROIImageFilter::New();
roifilter->SetInput(meshVisualInforVol);
roifilter->SetRegionOfInterest(region);
roifilter->Update();
meshCastFilter->SetInfoImage(roifilter->GetOutput());
//VisualizingImageType::Pointer visualizing
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Re-ITK-users-what-is-the-best-way-to-do-TriangleMeshToBinaryImageFilter-on-a-region-tp7589528p7589530.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list