<div dir="ltr">Hey guys,<div><br></div><div>When using Python 3.0+, the operator / utilizes __truediv__ instead of __div__. For itk.Image, truediv uses DivideReal and div uses Divide. This is relevant because DivideReal returns an image with double datatype and Divide uses the datatype of the input image.</div><div><br></div><div>Since I am using 32-bit floats for my images, this requires me to cast to a 32-bit float each time. It would be more convenient if it mimicked the datatype of the input image OR you could specify the desired datatype.</div><div><br></div><div>Here is a test case to show what I mean:</div><div><br></div><div><div>image = sitk.Image(50, 50, 50, sitk.sitkFloat32)</div><div>image2 = sitk.DivideReal(image, 4.0)</div><div>print(image) # <---- Type is float</div><div>print(image2) # <---- Type is double</div><div><br></div><div>image = sitk.Image(50, 50, 50, sitk.sitkFloat32)</div><div>image2 = sitk.Divide(image, 4.0)</div><div>print(image) # <---- Type is float</div><div>print(image2) # <---- Type is float</div></div><br>I've been using ITK for a few weeks and SimpleITK for about a week. I've have SimpleITK built from source. <div><ul><li>Is this a feature/bug worthy of fixing?<br></li><li>Can someone point me in the right direction as to where I should start for fixing the issue?<br></li><li>Any other tips and comments are welcome!</li></ul></div><div><div><div><br></div><div>Addison</div></div></div></div>