@staticmethod
def convert2d(feature, proj2d):
    """Convert the 3D volumetric feature to a 2D planar data set.

        proj2d specifies the dimension that we want to consider as channel
        for example for proj2d = 0 the 2D images are in the yz plane and
        the stack along the x dimension is considered as extra channels
        Args:
            feature (np.array): raw features
            proj2d (int): projection
        Returns:
            np.array: projected features
        """
    nc, nx, ny, nz = feature.shape
    if proj2d == 0:
        feature = feature.reshape(-1, 1, ny, nz).squeeze()
    elif proj2d == 1:
        feature = feature.reshape(-1, nx, 1, nz).squeeze()
    elif proj2d == 2:
        feature = feature.reshape(-1, nx, ny, 1).squeeze()
    return feature
