images = [fixed_image, fixed_label, moving_image, moving_label]
images = np.concatenate(images, axis=-1)
images_shape = np.asarray(images.shape).T.astype(np.int32)
return images, images_shape
def _get_image(self, image_source_type, image_id):
// returns a random image from either the list of fixed images
// or the list of moving images
After Change
fixed_inputs = []
fixed_inputs.append(self._get_image("fixed_image", image_id)[0])
fixed_inputs.append(self._get_image("fixed_label", image_id)[0])
fixed_inputs = np.concatenate(fixed_inputs, axis=-1)
fixed_shape = np.asarray(fixed_inputs.shape).T.astype(np.int32)
// fetch moving image
moving_inputs = []
moving_inputs.append(self._get_image("moving_image", image_id)[0])
moving_inputs.append(self._get_image("moving_label", image_id)[0])
moving_inputs = np.concatenate(moving_inputs, axis=-1)
moving_shape = np.asarray(moving_inputs.shape).T.astype(np.int32)return fixed_inputs, moving_inputs, fixed_shape, moving_shape
def _get_image(self, image_source_type, image_id):
// returns a random image from either the list of fixed images
// or the list of moving images