Zero sform_code and srow_x, etc. in segmentation image
Brought to you by:
garyhuizhang,
pyushkevich
Sometimes when we create a segmentation image, it is created with sform_code = 0 and srow_x, srow_y, and srow_z = [0, 0, 0, 0]. This happens even though the main image has sform_code > 0.
Other times it works as expected, with the segmentation image taking its sform_code and srow_x, etc. from the main image.
Unfortunately we are not aware of the conditions under which the apparently aberrant behavior occurs.
Not sure if this is a bug or something we are not understanding. If it's a bug, a fix would be greatly appreciated because for now we had to write a complex script to work around the problem.