<div dir="ltr"><div><div><div>Hello all,<br><br></div><div>tl; dr<br><br></div><div>How can I reset the index of two labelObjects' bounding box generated from a ROIExtractor output to the original image's LargestPossibleRegion() coordinate system?<br></div><div><br>--<br></div><div><br></div>I need to apply a series of (non-itk) operations on a ShapeLabelObject present in a small ROI of the image with the purpose of dividing it in two. I was using ROI filter because among other things I want the Indexes to be referred to the ROI so it is less complex to refer to the voxels' coordinates.<br><br></div>But afterwards I need the original Index so that the GetBoundingBox() of the two generated label objects returns a region that refers to the original image repectively, while maintaining the size (probably index offset shift) of the new labelobject.<br><br></div><div>I could do as for now and store the roi and then do something like (roi.getIndex() + obj->GetBoudingBox().GetIndex() ) to create a shifted bounding box, but maybe there is a better way to do it, as read in the documentation:<br><br></div><div>The origin coordinates of the output images will be computed in such a 
way that if mapped to physical space, the output image will overlay the 
input image with perfect registration. In other words, a registration 
process between the output image and the input image will return an 
identity transform.</div><div><br></div><div>So how could I remap to the original "physical space"? I don't know to what does that phrase refer to, but it sounds like it's exactly what I am trying to do.<br></div><div><br></div><div>I've looked into SetRequestedRegion also as an alternative, but that would not give me indexes relative to roi, so I would have to substract them right before the operations, which might be an option too, but I believe things get complicated if I do that.<br><br></div><div>Cheers,<br><br></div><div>Pol<br></div><div><br><br></div><div><br><br></div></div>