예제 #1
0
 public static bool IsEqualTo(this IPix pix, IPix other,
                              Func <PixImage, PixImage, bool> imageEqualFun    = null,
                              Func <PixVolume, PixVolume, bool> volumeEqualFun = null,
                              Func <string, string, bool> stringEqualFun       = null)
 {
     if (imageEqualFun == null)
     {
         imageEqualFun = (a, b) => a == b;
     }
     if (volumeEqualFun == null)
     {
         volumeEqualFun = (a, b) => a == b;
     }
     if (stringEqualFun == null)
     {
         stringEqualFun = (a, b) => a == b;
     }
     try
     {
         return(pix.Op(new PixInnerProductOp <bool>(
                           new PixEqualOp(imageEqualFun, volumeEqualFun, stringEqualFun), other))());
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
 public static IPix GetDescriptors(this IPix pix)
 {
     return(pix.Op(new PixGetInfo()));
 }
예제 #3
0
 public static PixImage[] GetPixImageArray(this IPix pix, int level = 0)
 {
     return(pix.Op(new PixGetPixImageArray(level))());
 }
예제 #4
0
 public static IPix ToPixImage <T>(this IPix pix)
 {
     return(pix.Op(new PixToPixImage <T>()));
 }
예제 #5
0
 public static IPix WithMipMaps(
     this IPix pix, PixImageMipMap.MipMapOptions options = null)
 {
     return(pix.Op(new PixCreateMipMaps(options == null
                     ? PixImageMipMap.MipMapOptions.Default : options)));
 }
예제 #6
0
 /// <summary>
 /// </summary>
 /// <returns>The number of saved PixImages.</returns>
 public static int SaveImages(this IPix pix, IPix names, string pathPrefix = null)
 {
     return(pix.Op(new PixSaveOp(names, pathPrefix == null ? "" : pathPrefix))());
 }
예제 #7
0
 public static IPix WithLoadedImages(this IPix pix, string pathPrefix = null)
 {
     return(pix.Op(new PixLoadOp(pathPrefix == null ? "" : pathPrefix)));
 }
예제 #8
0
 public static IPix WithRemovedMipMaps(this IPix pix)
 {
     return(pix.Op(new PixRemoveMipMaps()));
 }