[Insight-users] error while extracting slice in x and y direction
Jayachandran, Ganesh
ganesh.jayachandran at philips.com
Sat Mar 17 19:17:20 EDT 2012
Hi,
I am trying to extract a slice in the x and y direction other than the z direction. Initially the direction is set to "z" and then the direction is set to "x". The code works fine for "z" direction but when I set the direction to "x", I get an error
as below
Requested region is (at least partially outside the largest possible region.
Kindly let me know what I have done wrong. Pl. find the code snippet below. The code is called iteratively for the same MR data.
size = inputRegion.GetSize();
start = inputRegion.GetIndex();
size[direction] = 0;
start[direction] = number;
//Now set the parametrs to the extract the desired region
//the parameters are size and slice number
InputImageType::RegionType desiredRegion;
desiredRegion.SetSize( size );
desiredRegion.SetIndex( start );
filter->SetExtractionRegion( desiredRegion );
filter->SetInput( output );
filter->Update();
________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120317/67535876/attachment.htm>
More information about the Insight-users
mailing list