I m using following code to display textures along x,y and z axis in a cube.there are 55 textures. I m displaying them in a cube to create 3D image. Each image contain red and black color.
String imagename="C:\\DICOMimages\\ii\\ii00" + i + ".gif";
File file = new File(imagename);
BufferedImage bImage1 =new BufferedImage( 128,128,BufferedImage.TYPE_INT_ARGB);
try
{
bImage1 = ImageIO.read( file );
}
catch ( IOException e )
{
System.out.println( "image missing" );
}
Texture2D tex;
ImageComponent2D pArray;
tex = new Texture2D(Texture.BASE_LEVEL,Texture.INTENSITY, 128, 128);
pArray = new ImageComponent2D(ImageComponent.FORMAT_CHANNEL8, 128, 128);
pArray.set(bImage1); tex.setImage(0, pArray);
tex.setEnable(true);
tex.setMinFilter(tex.BASE_LEVEL_LINEAR);
tex.setMagFilter(tex.BASE_LEVEL_LINEAR);
tex.setBoundaryModeS(tex.CLAMP);
tex.setBoundaryModeT(tex.CLAMP);
textures[i] = tex;
ii00 is a red and black colored image. If I use Texture.INTENSITY the images are displayed in gray and white color.and 3D model created. But i want colored 3D model.
I use Texture.RGBA instead of Texture.INTENSITY
But it is displaying only first and last images in red and black color.
What i have to do for displaying the same model in red color..

New Topic/Question
Reply




MultiQuote


|