def METHOD_NAME(self, workspace):
    x_name = self.x_name.value
    y_name = self.y_name.value
    objects = workspace.object_set
    x = objects.get_objects(x_name)
    dimensions = x.dimensions
    x_data = x.segmented
    if self.method.value == "Dimensions":
        if x_data.ndim == 3:
            size = (self.planes.value, self.height.value, self.width.value)
        else:
            size = (self.height.value, self.width.value)
        y_data = resize(x_data, size)
    elif self.method.value == "Match Image":
        target_image = workspace.image_set.get_image(self.specific_image.value)
        if target_image.volumetric:
            size = target_image.pixel_data.shape[:3]
        else:
            size = target_image.pixel_data.shape[:2]
        y_data = resize(x_data, size)
    else:
        if x_data.ndim == 3:
            size = (self.factor_z.value, self.factor_y.value, self.factor_x.value)
        else:
            size = (self.factor_y.value, self.factor_x.value)
        y_data = rescale(x_data, size)
    y = Objects()
    y.segmented = y_data
    objects.add_objects(y, y_name)
    self.add_measurements(workspace)
    if self.show_window:
        workspace.display_data.x_data = x_data
        workspace.display_data.y_data = y_data
        workspace.display_data.dimensions = dimensions