

@classmethod
def init_from_indices_mapping(cls, pointcloud, labels_to_indices, copy=True):
    '\n        Static constructor to create a :map:`LandmarkGroup` from an ordered\n        dictionary that maps a set of indices .\n\n        Parameters\n        ----------\n        pointcloud : :map:`PointCloud`\n            The pointcloud representing the landmarks.\n        labels_to_indices : `ordereddict` {`str` -> `int ndarray`}\n            For each label, the indices in to the pointcloud that belong to the\n            label.\n        copy : `boolean`, optional\n            If ``True``, a copy of the :map:`PointCloud` is stored on the group.\n\n        Returns\n        -------\n        lmark_group : :map:`LandmarkGroup`\n            Landmark group wrapping the given pointcloud with the given\n            semantic labels applied.\n\n        Raises\n        ------\n        ValueError\n            If `dict` passed instead of `OrderedDict`\n        ValueError\n            If any of the label masks differs in size to the pointcloud.\n        ValueError\n            If there exists any point in the pointcloud that is not covered\n            by a label.\n        '
    labels_to_masks = indices_to_masks(labels_to_indices, pointcloud.n_points)
    return LandmarkGroup(pointcloud, labels_to_masks, copy=copy)

dataset/ETHPy150Open menpo/menpo/menpo/landmark/base.py LandmarkGroup.init_from_indices_mapping/original