GiciTransform
Class LevelShift

java.lang.Object
  extended by GiciTransform.LevelShift

public class LevelShift
extends java.lang.Object

This class receives an image and performs level shift operations. Usage example:
  construct
  setParameters
  run
  get functions

Version:
1.0
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
(package private)  float[][][] imageSamples
           
(package private)  boolean[] LSComponents
          Specification of the image component to apply the level shift.
(package private)  int[] LSSubsValues
          Substracted values of each image component.
(package private)  int LSType
          Shift type to apply.
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  int[] QComponentsBits
           
(package private)  int xSize
           
(package private)  int ySize
           
(package private)  int zSize
           
 
Constructor Summary
LevelShift(float[][][] imageSamples)
          Constructor that receives the original image samples.
 
Method Summary
 int[] getSubsValues()
           
 float[][][] run()
          Performs the level shift operations and returns the result image.
 void setParameters(int LSType, boolean[] LSComponents, int[] LSSubsValues, int[] QComponentsBits)
          Set the parameters used to do the level shift operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSamples

float[][][] imageSamples

zSize

int zSize

ySize

int ySize

xSize

int xSize

LSType

int LSType
Shift type to apply.

Valid values are:


LSComponents

boolean[] LSComponents
Specification of the image component to apply the level shift.

If true the level shift will be applied, otherwise false.


LSSubsValues

int[] LSSubsValues
Substracted values of each image component.

If LSType == 4 then this variable cannot be null, otherwise it can be null in setParameters function


QComponentsBits

int[] QComponentsBits

parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.

Constructor Detail

LevelShift

public LevelShift(float[][][] imageSamples)
Constructor that receives the original image samples.

Parameters:
imageSamples -
Method Detail

setParameters

public void setParameters(int LSType,
                          boolean[] LSComponents,
                          int[] LSSubsValues,
                          int[] QComponentsBits)
Set the parameters used to do the level shift operation.

Parameters:
LSType - definition in LSType
LSComponents - definition in LSComponents
LSSubsValues - definition in LSSubsValues
QComponentsBits -

run

public float[][][] run()
                throws ErrorException
Performs the level shift operations and returns the result image.

Returns:
the level shifted image
Throws:
ErrorException - when parameters are not set or unrecognized level shift type is passed

getSubsValues

public int[] getSubsValues()
Returns:
LSSubsValues definition in LSSubsValues


TER - Copyright (C) 2006
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) - UAB (Spain)