예제 #1
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (FileId != null)
         {
             hashCode = hashCode * 59 + FileId.GetHashCode();
         }
         if (PageRange != null)
         {
             hashCode = hashCode * 59 + PageRange.GetHashCode();
         }
         if (Filters != null)
         {
             hashCode = hashCode * 59 + Filters.GetHashCode();
         }
         hashCode = hashCode * 59 + RoiLeft.GetHashCode();
         hashCode = hashCode * 59 + RoiTop.GetHashCode();
         hashCode = hashCode * 59 + RoiWidth.GetHashCode();
         hashCode = hashCode * 59 + RoiHeight.GetHashCode();
         hashCode = hashCode * 59 + GaussianKernelSize.GetHashCode();
         hashCode = hashCode * 59 + UnsharpMaskRadius.GetHashCode();
         hashCode = hashCode * 59 + UnsharpMaskAmount.GetHashCode();
         hashCode = hashCode * 59 + UnsharpMaskThreshold.GetHashCode();
         hashCode = hashCode * 59 + SubtractBackgroundRollingBallSize.GetHashCode();
         hashCode = hashCode * 59 + SubtractBackgroundLightBackground.GetHashCode();
         hashCode = hashCode * 59 + MedianKernelSize.GetHashCode();
         hashCode = hashCode * 59 + MinKernelSize.GetHashCode();
         hashCode = hashCode * 59 + MaxKernelSize.GetHashCode();
         hashCode = hashCode * 59 + SoftenValue.GetHashCode();
         hashCode = hashCode * 59 + ColorizeHue.GetHashCode();
         hashCode = hashCode * 59 + ColorizeSaturation.GetHashCode();
         hashCode = hashCode * 59 + ColorizeLuminosity.GetHashCode();
         return(hashCode);
     }
 }
예제 #2
0
        /// <summary>
        /// Returns true if ImageFilterParameters instances are equal
        /// </summary>
        /// <param name="input">Instance of ImageFilterParameters to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImageFilterParameters input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FileId == input.FileId ||
                     (FileId != null &&
                      FileId.Equals(input.FileId))
                     ) &&
                 (
                     PageRange == input.PageRange ||
                     (PageRange != null &&
                      PageRange.Equals(input.PageRange))
                 ) &&
                 (
                     Filters == input.Filters ||
                     Filters != null &&
                     input.Filters != null &&
                     Filters.SequenceEqual(input.Filters)
                 ) &&
                 (
                     RoiLeft == input.RoiLeft ||
                     RoiLeft.Equals(input.RoiLeft)
                 ) &&
                 (
                     RoiTop == input.RoiTop ||
                     RoiTop.Equals(input.RoiTop)
                 ) &&
                 (
                     RoiWidth == input.RoiWidth ||
                     RoiWidth.Equals(input.RoiWidth)
                 ) &&
                 (
                     RoiHeight == input.RoiHeight ||
                     RoiHeight.Equals(input.RoiHeight)
                 ) &&
                 (
                     GaussianKernelSize == input.GaussianKernelSize ||
                     GaussianKernelSize.Equals(input.GaussianKernelSize)
                 ) &&
                 (
                     UnsharpMaskRadius == input.UnsharpMaskRadius ||
                     UnsharpMaskRadius.Equals(input.UnsharpMaskRadius)
                 ) &&
                 (
                     UnsharpMaskAmount == input.UnsharpMaskAmount ||
                     UnsharpMaskAmount.Equals(input.UnsharpMaskAmount)
                 ) &&
                 (
                     UnsharpMaskThreshold == input.UnsharpMaskThreshold ||
                     UnsharpMaskThreshold.Equals(input.UnsharpMaskThreshold)
                 ) &&
                 (
                     SubtractBackgroundRollingBallSize == input.SubtractBackgroundRollingBallSize ||
                     SubtractBackgroundRollingBallSize.Equals(input.SubtractBackgroundRollingBallSize)
                 ) &&
                 (
                     SubtractBackgroundLightBackground == input.SubtractBackgroundLightBackground ||
                     SubtractBackgroundLightBackground.Equals(input.SubtractBackgroundLightBackground)
                 ) &&
                 (
                     MedianKernelSize == input.MedianKernelSize ||
                     MedianKernelSize.Equals(input.MedianKernelSize)
                 ) &&
                 (
                     MinKernelSize == input.MinKernelSize ||
                     MinKernelSize.Equals(input.MinKernelSize)
                 ) &&
                 (
                     MaxKernelSize == input.MaxKernelSize ||
                     MaxKernelSize.Equals(input.MaxKernelSize)
                 ) &&
                 (
                     SoftenValue == input.SoftenValue ||
                     SoftenValue.Equals(input.SoftenValue)
                 ) &&
                 (
                     ColorizeHue == input.ColorizeHue ||
                     ColorizeHue.Equals(input.ColorizeHue)
                 ) &&
                 (
                     ColorizeSaturation == input.ColorizeSaturation ||
                     ColorizeSaturation.Equals(input.ColorizeSaturation)
                 ) &&
                 (
                     ColorizeLuminosity == input.ColorizeLuminosity ||
                     ColorizeLuminosity.Equals(input.ColorizeLuminosity)
                 ));
        }