Class Imgs


  • public final class Imgs
    extends Object
    Utility methods for working with Img objects.
    Author:
    Curtis Rueden
    • Method Detail

      • adjustMinMax

        public static <T extends Type<T>> Img<T> adjustMinMax​(Img<T> img,
                                                              Object minMax)
        Adjusts the given Img to match the bounds of the specified Interval.
        Parameters:
        img - An image whose min/max bounds might need adjustment.
        minMax - An Interval whose min/max bounds to use when adjusting the image. If the provided minMax object is not an Interval, no adjustment is performed.
        Returns:
        A wrapped version of the input Img with bounds adjusted to match the provided Interval, if any; or the input image itself if no adjustment was needed/possible.