public static ImageRaster4D <bool> GetShell4D8C(ImageRaster4D <bool> source, bool border_is_shell = false) { ITopologyElement topology = new TopologyElementRaster4D8Connectivity(source.Raster); ImageRaster4D <bool> target = new ImageRaster4D <bool>(source.Raster); GetShellRBA(source, topology, target, border_is_shell); return(target); }
public static ImageRaster4D <bool> Threshold <DomainType>(ImageRaster4D <DomainType> image, DomainType lower_threshold, DomainType upper_threshold) where DomainType : IComparable <DomainType> { return(new ImageRaster4D <bool>(image.Convert <bool>(new FunctionBoxCar <DomainType>(lower_threshold, upper_threshold)), false)); }
public static ImageRaster4D <bool> Threshold <DomainType>(ImageRaster4D <DomainType> image, DomainType threshold) where DomainType : IComparable <DomainType> { return(new ImageRaster4D <bool>(image.Convert <bool>(new FunctionStep <DomainType>(threshold)), false)); }