[Insight-users] setting up a smaller region for registration

Luis Ibanez luis.ibanez at kitware.com
Sat Apr 29 15:05:58 EDT 2006


Hi Rick,

Your method of setting the FixedImageRegion() size seems to be
reasonable.

You should be fine setting a small region as the FixedImageRegion.

As a sanity check you could print out the Region using a line
like:


            std::cout << region << std::endl


or

            region.Print( std::cout );


   Regards,


     Luis

====================
Rick Shilling wrote:
> I want to only use only a few slices (around 1-5), starting near the 
> middle of a 3-D fixed Image to do registration instead of the entire 
> buffered region.  I want to verify that I using & setting up the region 
> correctly.  (I didn't see an explicit example in the ITK guide for 
> smaller regions.)  Is this the correct way to set up a subregion? 
> 
> typedef itk::ImportImageFilter< float, 3> ImportFilterType;
> ImportFilterType::Pointer importFixedFilter = ImportFilterType::New();
> .
> .
> .
> ImportFilterType::RegionType region;
> ImportFilterType::SizeType size;
> ImportFilterType::IndexType index;
> 
> size = importFixedFilter->GetOutput()->GetBufferedRegion().GetSize();
> index[0]  = 0;
> index[1]  = 0;
> index[2]  = (int)(0.5*size[2]);
> size[2]    = 5;
> region.SetSize( size );
> region.SetIndex( index);
> 
> EOF
> Thanks-
> Rick
> 
> ------------------------------------------------------------------------
> New Yahoo! Messenger with Voice. Call regular phones from your PC 
> <http://us.rd.yahoo.com/mail_us/taglines/postman5/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com> 
> and save big.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list