[Insight-users] Managing multiple regions in ITK

Miller, James V (Research) millerjv at crd.ge.com
Wed Apr 6 15:32:50 EDT 2005


Todd, 
 
Your suggestion is reasonable.  There are slight differences between the ExtractImageFilter and the RegionOfInterestImageFilter.  Both end up with a contiguous image block.  However, ExtractImageFilter will maintain the origin and indices of the original image, i.e. pixel [i,j] will be same pixel in the original image and in the extracted image (assuming [i,j] is an index in the extracted image). This means athe ExtractImageFilter keeps the output image in the same physical and index space as the original image. RegionOfInterestImageFilter on the other hand, sets the start index of the output image to [0,0] and resets the origin so that the subimage will be in the correct physical space (even though the index spaces are different between the original and extracted image).
 
Which filter you use depends on how you are most comfortable managing image indices.
 
Another option is to ITK's pipeline mechanism to request a filter only process a subregion of an image.  Many of ITK filters allow you to say
 
filter->GetOutput()->SetRequestRegion(someRegion);
filter->Update();
 
and the output of the filter will be a image with region someRegion (the filter will only produce the region someRegion even if it is smaller than the entire image).  To ensure the correct results are produced, the filter may request a larger region on the input (padding the output region by say a kernel size to ensure no artificial boundary conditions are used).
 
It is up to the filter to decide whether it can produce just the "someRegion" specified in the request.  Some filters can choose to produce the entire output regardless of the request because it would be too inefficient to do otherwise.  If you are not sure whether a filter will produce just the region you want when specifying a RequestedRegion, then you are better off using the ExtractImageFilter or RegionOfInterestFilter to crop the image appropriately.
 
Jim

	-----Original Message----- 
	From: insight-users-bounces at itk.org on behalf of Gable, Todd (GE Infrastructure) 
	Sent: Wed 4/6/2005 2:22 PM 
	To: Insight-users at itk.org 
	Cc: 
	Subject: [Insight-users] Managing multiple regions in ITK
	
	

	I was wondering what the best way is to handle objects/3d-regions in a volume post segmentation. If we have N objects post connected components, what is the best way to handle them individually and yet maintain their relative position to the original 3D image? From what I have read searching around, it looks like using ExtractImageFilter (or RegionOfInterestImageFilter?) and keeping a list or container of these sub-regions might work best. We could have N regions, each with a small volume for fast filtering. We could then apply local filters like erode and use the output as the input to a mask filter on the original image to get grayscale values per object to compute statistics. Does this sound right, or is there some other ITK mechanism that would handle these activities better?
	
	Todd Gable
	
	_______________________________________________
	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