/// <summary>
 /// Converts the source channel depth to the destination channel depth.
 /// </summary>
 /// <typeparam name="TDepth">Destination channel depth.</typeparam>
 /// <param name="image">Image.</param>
 /// <returns>Image with converted element depth.</returns>
 public static Gray <TDepth>[,] Cast <TDepth>(this Gray <double>[,] image)
 where TDepth : struct
 {
     return(image.ConvertChannelDepth <Gray <double>, Gray <TDepth> >());
 }