GiciTransform
Class TransposeImage

java.lang.Object
  extended by GiciTransform.TransposeImage

public class TransposeImage
extends java.lang.Object

This class receives an image and transposes it if required.Typically it is used in the following way:
constructor(receiveing the image to be transposed)
setParameters
run

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

Field Summary
(package private)  float[][][] imageSamples
          Original image samples (index meaning [z][y][x]).
(package private)  boolean parametersSet
          To know if parameters are set.
(package private)  int[] transposeImg
          Indicates whether each component should be transposed after reconstruction
 
Constructor Summary
TransposeImage(float[][][] imageSamples)
          Constructor of TransposeImage.
 
Method Summary
static boolean needTranspose(int[] transposeImg)
          According to the given paramater, determines if the image should be transposed or not.
 float[][][] run()
          Transposes the image and returns it.
 void setParameters(int[] transposeImg)
          Set the parameter used to transpose the image and check validity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageSamples

float[][][] imageSamples
Original image samples (index meaning [z][y][x]).

All values allowed.


transposeImg

int[] transposeImg
Indicates whether each component should be transposed after reconstruction

Valid values are:


parametersSet

boolean parametersSet
To know if parameters are set.

True indicates that they are set otherwise false.

Constructor Detail

TransposeImage

public TransposeImage(float[][][] imageSamples)
Constructor of TransposeImage. It receives the image to be transposed.

Parameters:
imageSamples - definition in imageSamples
Method Detail

setParameters

public void setParameters(int[] transposeImg)
                   throws ParameterException
Set the parameter used to transpose the image and check validity. If the parameter is not initialized, this class initalizes it with default value.

Parameters:
transposeImg - definition in transposeImg
Throws:
ParameterException - when an invalid or unrecognized exception is detected it will be thrown

run

public float[][][] run()
                throws ParameterException
Transposes the image and returns it.

Returns:
a float array containing the transposed image
Throws:
ParameterException - when an invalid or unrecognized exception is detected it will be thrown

needTranspose

public static boolean needTranspose(int[] transposeImg)
According to the given paramater, determines if the image should be transposed or not.

Parameters:
transposeImg - definition in transposeImg
Returns:
a boolean which indicates if the image should be transposed.


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)