Ejemplo n.º 1
0
 /// <summary> Parse filters from the given word
 ///
 /// </summary>
 /// <param name="word">String to parse
 ///
 /// </param>
 /// <returns> Analysis wavelet filter (first dimension: by direction,
 /// second dimension: by decomposition levels)
 /// </returns>
 private AnWTFilter[][] parseFilters(System.String word)
 {
     AnWTFilter[][] filt = new AnWTFilter[2][];
     for (int i = 0; i < 2; i++)
     {
         filt[i] = new AnWTFilter[1];
     }
     if (word.ToUpper().Equals("w5x3".ToUpper()))
     {
         filt[0][0] = new AnWTFilterIntLift5x3();
         filt[1][0] = new AnWTFilterIntLift5x3();
         return(filt);
     }
     else if (word.ToUpper().Equals("w9x7".ToUpper()))
     {
         filt[0][0] = new AnWTFilterFloatLift9x7();
         filt[1][0] = new AnWTFilterFloatLift9x7();
         return(filt);
     }
     else
     {
         throw new System.ArgumentException("Non JPEG 2000 part I filter: " + word);
     }
 }
Ejemplo n.º 2
0
		/// <summary> Parse filters from the given word
		/// 
		/// </summary>
		/// <param name="word">String to parse
		/// 
		/// </param>
		/// <returns> Analysis wavelet filter (first dimension: by direction,
		/// second dimension: by decomposition levels)
		/// </returns>
		private AnWTFilter[][] parseFilters(System.String word)
		{
			AnWTFilter[][] filt = new AnWTFilter[2][];
			for (int i = 0; i < 2; i++)
			{
				filt[i] = new AnWTFilter[1];
			}
			if (word.ToUpper().Equals("w5x3".ToUpper()))
			{
				filt[0][0] = new AnWTFilterIntLift5x3();
				filt[1][0] = new AnWTFilterIntLift5x3();
				return filt;
			}
			else if (word.ToUpper().Equals("w9x7".ToUpper()))
			{
				filt[0][0] = new AnWTFilterFloatLift9x7();
				filt[1][0] = new AnWTFilterFloatLift9x7();
				return filt;
			}
			else
			{
				throw new System.ArgumentException("Non JPEG 2000 part I filter: " + word);
			}
		}