<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<BR>
I want to process the image volume slice by slice, so I use RegionOfInterestImageFilter to extract one slice from the volume as following:<BR>
<BR>
OutputImageType::SizeType size = filter->GetOutput()->GetLargestPossibleRegion().GetSize();<BR> unsigned short slicenum = size[2];<BR> OutputImageType::IndexType start = filter->GetOutput()->GetLargestPossibleRegion().GetIndex(); <BR>
typedef itk::RegionOfInterestImageFilter< OutputImageType, <BR> OutputImageType > ROIFilterType;<BR>
ROIFilterType::Pointer roifilter = ROIFilterType::New();<BR>
for ( unsigned short i = 0; i < slicenum; i++ )<BR> {<BR> start[2] = i;<BR> size[2] = 1;<BR> OutputImageType::RegionType desiredRegion;<BR> desiredRegion.SetSize( size );<BR> desiredRegion.SetIndex( start );<BR>
roifilter->SetRegionOfInterest( desiredRegion );<BR> roifilter->SetInput(filter->GetOutput());<BR>
OutputImageType::SizeType roisize = roifilter->GetOutput()->GetLargestPossibleRegion().GetSize();<BR> roifilter->Update();<BR>
}<BR>
<BR>
But, I got roisize=[0,0,0], Anyone can help me?<BR>
Thx.<BR><BR><RTE_TEXT></RTE_TEXT><br /><hr />MSN热搜榜全新升级,更多排行榜等着你! <a href=' http://top.msn.com.cn' target='_new'>立即查看!</a></body>
</html>