@staticmethod
def plane_points_idx(points, ctx, plane='Transversal'):
    """
        Convert a points in a 3D cube in terms of [mm, mm, mm] to the current plane in terms of [idx,idx].

        :param points: INPUT: list of points in [[x0,y0,z0],[x1,y1,z1], ...[xn,yn,zn]] (mm) format
                       OUTPUT: list of points pseudo-2D format.
        :param ctx:
        :param plane:

        TODO: code would be easier to read, if this is split up into two steps. 1) conv. to index, 2) extraction.
        """
    ct_pixsize_inv = 1.0 / ctx.pixel_size
    ct_slicedist_inv = 1.0 / ctx.slice_distance
    for point in points:
        if plane == 'Transversal':
            point[:, (0)] *= ct_pixsize_inv
            point[:, (1)] *= ct_pixsize_inv
        elif plane == 'Sagittal':
            point[:, (0)] = (-point[:, (1)] + ctx.pixel_size * ctx.dimx
                ) * ct_pixsize_inv
            point[:, (1)] = (-point[:, (2)] + ctx.slice_distance * ctx.dimz
                ) * ct_slicedist_inv
        elif plane == 'Coronal':
            point[:, (0)] = (-point[:, (0)] + ctx.pixel_size * ctx.dimy
                ) * ct_pixsize_inv
            point[:, (1)] = (-point[:, (2)] + ctx.slice_distance * ctx.dimz
                ) * ct_slicedist_inv
