<div dir="ltr"><div><div>Hi, <br></div>I'm working on a 2D registration methode. I'm using an affine transformation with the metric being the mutual information. <br><br><br></div><div>The point is that I dont want to consider the whole fixed image in the registration process, so what I should do is choose a region of interest. <br>
<br></div><div>I have a binary image with a value of 1 where I want to take the pixels in consideration ( my ROI ) and 0 elsewhere. <br><br></div><div>I tried to set the metric fixed image mask to my binary image (using spatialobjectmask)<br>
<br></div><div>But sometimes I get the next error : "A spacing of 0 is not allowed" even thought I'm not changing the spacing at all! <br><br></div><div>But since the region I want to focus on is a rectangle, I thought maybe it would be easier to use FixedImageRegion for the registration process not for the metric. <br>
<br></div><div>So, my question is, how can I pass my mask to the FixedImageRegion function ? <br><br></div><div>Thanks <br><br></div><div>Iyas<br></div></div>