1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
publicclass ImageStructure
{ /* this class is needed more for creatinh Gslib file rather then displaying it in this current application */
privateint ISize;
privateint JSize;
privateint KSize;
private Color BGColor;
privateint BGColorNumber ; // the number associated
privateint [,,] Image;
// the public Construvtor of this Class, just set the Basic Index */
public ImageStructure(int I, int J, int K, Color BGC, int BGCNumber)
{
this.ISize = I;
this.JSize = J;
this.KSize = K;
this.BGColor = BGC;
this.BGColorNumber = BGCNumber;
}
///<summary>
/// will create the 3D grid representation the image
/// will be called only when we want to export to GSLIB file
///</summary>
privatevoid CreateStructure()
{
this.Image = newint[this.ISize,this.JSize,this.KSize];
for (int IIndex = 0;IIndex<this.ISize;IIndex++)
{
for (int JIndex = 0;JIndex<this.JSize;JIndex++)
{
for (int KIndex = 0;KIndex<this.KSize;KIndex++)
this.Image[IIndex,JIndex,KIndex] = this.BGColorNumber;// Initialise the Image to the background
}
}
}
/* this method will introduce an object in the current image */
privatevoid InsertShape(int XPosition, int YPosition, int ZPostion,int []FacieColor)
{
/* we need just to calculate where we should insert the object in the main image structure */
}
}
|
Partager