API consistency changes
This commit is contained in:
parent
fe3ecd84a0
commit
d8531012a6
@ -12,14 +12,14 @@ public class FourSidedScanner extends SingleColorScanner {
|
||||
private SideScanner behindSideScanner;
|
||||
private SideScanner leftSideScanner;
|
||||
|
||||
public FourSidedScanner(BufferedImage frontSideImages[], BufferedImage rightSideImages[], BufferedImage behindSideImages[], BufferedImage leftSideImages[], byte gammaDelta) {
|
||||
public FourSidedScanner(BufferedImage frontSideImages[], BufferedImage rightSideImages[], BufferedImage behindSideImages[], BufferedImage leftSideImages[]) {
|
||||
|
||||
//TODO
|
||||
|
||||
frontSideScanner = new SingleColoredSideScanner(frontSideImages, gammaDelta, , , );
|
||||
rightSideScanner = new SingleColoredSideScanner(rightSideImages, gammaDelta, , , );
|
||||
behindSideScanner = new SingleColoredSideScanner(behindSideScanner, gammaDelta, , , );
|
||||
leftSideScanner = new SingleColoredSideScanner(leftSideScanner, gammaDelta, , , );
|
||||
frontSideScanner = new SingleColoredSideScanner(frontSideImages, this.gammaDelta, , , );
|
||||
rightSideScanner = new SingleColoredSideScanner(rightSideImages, this.gammaDelta, , , );
|
||||
behindSideScanner = new SingleColoredSideScanner(behindSideScanner, this.gammaDelta, , , );
|
||||
leftSideScanner = new SingleColoredSideScanner(leftSideScanner, this.gammaDelta, , , );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -54,140 +54,140 @@ public abstract Point3D[] scan();
|
||||
// return null;
|
||||
// }
|
||||
|
||||
public void setData(ScannerData dataType, BufferedImage images[]) {
|
||||
//TODO convert image to known format utilizing
|
||||
// BufferedImage image = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);
|
||||
//Graphics g = image.getGraphics();
|
||||
//g.drawImage(colorImage, 0, 0, null);
|
||||
//g.dispose();
|
||||
|
||||
if(distinctColorChannels == null || sideCount == null); //TODO error
|
||||
|
||||
if(distinctColorChannels.booleanValue() == false) {
|
||||
if(dataType.ordinal() >= ScannerData.IMAGE_FRONT_RED.ordinal() && dataType.ordinal() <= ScannerData.IMAGE_LEFT_BLUE.ordinal()); //TODO error
|
||||
|
||||
if(sideCount.booleanValue() == false) {
|
||||
switch (dataType){
|
||||
case IMAGE_FRONT:
|
||||
{
|
||||
frontSideImages = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_RIGHT:
|
||||
{
|
||||
rightSideImages = images;
|
||||
break;
|
||||
}
|
||||
|
||||
case IMAGE_BEHIND:
|
||||
case IMAGE_LEFT:
|
||||
default:
|
||||
//TODO error
|
||||
}
|
||||
}else {
|
||||
switch (dataType){
|
||||
case IMAGE_FRONT:
|
||||
{
|
||||
frontSideImages = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_RIGHT:
|
||||
{
|
||||
rightSideImages = images;
|
||||
break;
|
||||
}
|
||||
|
||||
case IMAGE_BEHIND:
|
||||
{
|
||||
behindSideImages = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_LEFT:
|
||||
{
|
||||
leftSideImages = images;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
//TODO error
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(dataType.ordinal() >= ScannerData.IMAGE_FRONT.ordinal() && dataType.ordinal() <= ScannerData.IMAGE_LEFT.ordinal()); //TODO error
|
||||
if(sideCount.booleanValue() == false) {
|
||||
if(dataType.ordinal() >= ScannerData.IMAGE_BEHIND_RED.ordinal() && dataType.ordinal() <= ScannerData.IMAGE_LEFT_BLUE.ordinal()){
|
||||
//Todo error
|
||||
}
|
||||
}
|
||||
|
||||
switch (dataType) {
|
||||
case IMAGE_FRONT_RED:
|
||||
{
|
||||
frontSideImagesRed = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_FRONT_GREEN:
|
||||
{
|
||||
frontSideImagesGreen = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_FRONT_BLUE:
|
||||
{
|
||||
frontSideImagesBlue = images;
|
||||
break;
|
||||
}
|
||||
|
||||
case IMAGE_RIGHT_RED:
|
||||
{
|
||||
rightSideImagesRed = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_RIGHT_GREEN:
|
||||
{
|
||||
rightSideImagesGreen = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_RIGHT_BLUE:
|
||||
{
|
||||
rightSideImagesBlue = images;
|
||||
break;
|
||||
}
|
||||
|
||||
case IMAGE_BEHIND_RED:
|
||||
{
|
||||
behindSideImagesRed = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_BEHIND_GREEN:
|
||||
{
|
||||
behindSideImagesGreen = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_BEHIND_BLUE:
|
||||
{
|
||||
behindSideImagesBlue = images;
|
||||
break;
|
||||
}
|
||||
|
||||
case IMAGE_LEFT_RED:
|
||||
{
|
||||
leftSideImagesRed = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_LEFT_GREEN:
|
||||
{
|
||||
leftSideImagesGreen = images;
|
||||
break;
|
||||
}
|
||||
case IMAGE_LEFT_BLUE:
|
||||
{
|
||||
leftSideImagesBlue = images;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
//TODO error
|
||||
}
|
||||
}
|
||||
}
|
||||
// public void setData(ScannerData dataType, BufferedImage images[]) {
|
||||
// //TODO convert image to known format utilizing
|
||||
// // BufferedImage image = new BufferedImage(width, height,BufferedImage.TYPE_INT_RGB);
|
||||
// //Graphics g = image.getGraphics();
|
||||
// //g.drawImage(colorImage, 0, 0, null);
|
||||
// //g.dispose();
|
||||
//
|
||||
// if(distinctColorChannels == null || sideCount == null); //TODO error
|
||||
//
|
||||
// if(distinctColorChannels.booleanValue() == false) {
|
||||
// if(dataType.ordinal() >= ScannerData.IMAGE_FRONT_RED.ordinal() && dataType.ordinal() <= ScannerData.IMAGE_LEFT_BLUE.ordinal()); //TODO error
|
||||
//
|
||||
// if(sideCount.booleanValue() == false) {
|
||||
// switch (dataType){
|
||||
// case IMAGE_FRONT:
|
||||
// {
|
||||
// frontSideImages = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_RIGHT:
|
||||
// {
|
||||
// rightSideImages = images;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case IMAGE_BEHIND:
|
||||
// case IMAGE_LEFT:
|
||||
// default:
|
||||
// //TODO error
|
||||
// }
|
||||
// }else {
|
||||
// switch (dataType){
|
||||
// case IMAGE_FRONT:
|
||||
// {
|
||||
// frontSideImages = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_RIGHT:
|
||||
// {
|
||||
// rightSideImages = images;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case IMAGE_BEHIND:
|
||||
// {
|
||||
// behindSideImages = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_LEFT:
|
||||
// {
|
||||
// leftSideImages = images;
|
||||
// break;
|
||||
// }
|
||||
// default:
|
||||
// //TODO error
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// if(dataType.ordinal() >= ScannerData.IMAGE_FRONT.ordinal() && dataType.ordinal() <= ScannerData.IMAGE_LEFT.ordinal()); //TODO error
|
||||
// if(sideCount.booleanValue() == false) {
|
||||
// if(dataType.ordinal() >= ScannerData.IMAGE_BEHIND_RED.ordinal() && dataType.ordinal() <= ScannerData.IMAGE_LEFT_BLUE.ordinal()){
|
||||
// //Todo error
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// switch (dataType) {
|
||||
// case IMAGE_FRONT_RED:
|
||||
// {
|
||||
// frontSideImagesRed = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_FRONT_GREEN:
|
||||
// {
|
||||
// frontSideImagesGreen = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_FRONT_BLUE:
|
||||
// {
|
||||
// frontSideImagesBlue = images;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case IMAGE_RIGHT_RED:
|
||||
// {
|
||||
// rightSideImagesRed = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_RIGHT_GREEN:
|
||||
// {
|
||||
// rightSideImagesGreen = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_RIGHT_BLUE:
|
||||
// {
|
||||
// rightSideImagesBlue = images;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case IMAGE_BEHIND_RED:
|
||||
// {
|
||||
// behindSideImagesRed = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_BEHIND_GREEN:
|
||||
// {
|
||||
// behindSideImagesGreen = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_BEHIND_BLUE:
|
||||
// {
|
||||
// behindSideImagesBlue = images;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// case IMAGE_LEFT_RED:
|
||||
// {
|
||||
// leftSideImagesRed = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_LEFT_GREEN:
|
||||
// {
|
||||
// leftSideImagesGreen = images;
|
||||
// break;
|
||||
// }
|
||||
// case IMAGE_LEFT_BLUE:
|
||||
// {
|
||||
// leftSideImagesBlue = images;
|
||||
// break;
|
||||
// }
|
||||
// default:
|
||||
// //TODO error
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Sets how many of the brightests pixels are looked for in the images
|
||||
|
@ -10,12 +10,12 @@ public class TwoSidedScanner extends SingleColorScanner {
|
||||
private SideScanner frontSideScanner;
|
||||
private SideScanner rightSideScanner;
|
||||
|
||||
public TwoSidedScanner(BufferedImage frontSideImages[], BufferedImage rightSideImages[], byte gammaDelta) {
|
||||
public TwoSidedScanner(BufferedImage frontSideImages[], BufferedImage rightSideImages[]) {
|
||||
|
||||
//TODO
|
||||
|
||||
frontSideScanner = new SingleColoredSideScanner(frontSideImages, gammaDelta, , , );
|
||||
rightSideScanner = new SingleColoredSideScanner(rightSideImages, gammaDelta, , , );
|
||||
frontSideScanner = new SingleColoredSideScanner(frontSideImages, this.gammaDelta, , , );
|
||||
rightSideScanner = new SingleColoredSideScanner(rightSideImages, this.gammaDelta, , , );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user