def worker_landmarks_curved(self, arguments_worker):
        """Define landmarks along the centerline. Here, landmarks are densely defined along the centerline, and every
        gapxy, a cross of landmarks is created
        """
        try:
            iz = arguments_worker[0]
            iz_curved, x_centerline_deriv, y_centerline_deriv, z_centerline_deriv, x_centerline_fit, y_centerline_fit, z_centerline = arguments_worker[1]
            temp_results = []

            # loop across z_centerline (0-->zmax)
            if z_centerline[iz] in iz_curved:
                # at a junction (gapxy): set coordinates for landmarks at the center of the cross
                coord = Coordinate([0, 0, 0, 0])
                coord.x, coord.y, coord.z = x_centerline_fit[iz], y_centerline_fit[iz], z_centerline[iz]
                deriv = Coordinate([0, 0, 0, 0])
                deriv.x, deriv.y, deriv.z = x_centerline_deriv[iz], y_centerline_deriv[iz], z_centerline_deriv[iz]
                temp_results.append(coord)
                # compute cross
                cross_coordinates = compute_cross_centerline(coord, deriv, self.gapxy)
                for coord in cross_coordinates:
                    temp_results.append(coord)
            else:
                # not a junction: do not create the cross.
                temp_results.append(Coordinate([x_centerline_fit[iz], y_centerline_fit[iz], z_centerline[iz], 0], mode='continuous'))

            return iz, temp_results

        except __HOLE__:
            return

        except Exception as e:
            print 'Error on line {}'.format(sys.exc_info()[-1].tb_lineno)
            raise e
dataset/ETHPy150Open neuropoly/spinalcordtoolbox/scripts/sct_straighten_spinalcord.py/SpinalCordStraightener.worker_landmarks_curved