[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.


More information about the Insight-users mailing list