Exemple #1
0
        private static void EstimateGradient(MCCubeCornerScalarStruct *CCS)
        {
            CCS->GradientX[0]     =
                CCS->GradientX[1] =
                    CCS->Corners[1] - CCS->Corners[0];
            CCS->GradientX[2]     =
                CCS->GradientX[3] =
                    CCS->Corners[2] - CCS->Corners[3];
            CCS->GradientX[4]     =
                CCS->GradientX[5] =
                    CCS->Corners[5] - CCS->Corners[4];
            CCS->GradientX[6]     =
                CCS->GradientX[7] =
                    CCS->Corners[6] - CCS->Corners[7];

            CCS->GradientY[0]     =
                CCS->GradientY[3] =
                    CCS->Corners[3] - CCS->Corners[0];
            CCS->GradientY[1]     =
                CCS->GradientY[2] =
                    CCS->Corners[2] - CCS->Corners[1];
            CCS->GradientY[4]     =
                CCS->GradientY[7] =
                    CCS->Corners[7] - CCS->Corners[4];
            CCS->GradientY[5]     =
                CCS->GradientY[6] =
                    CCS->Corners[6] - CCS->Corners[5];

            CCS->GradientZ[0]     =
                CCS->GradientZ[4] =
                    CCS->Corners[4] - CCS->Corners[0];
            CCS->GradientZ[1]     =
                CCS->GradientZ[5] =
                    CCS->Corners[5] - CCS->Corners[1];
            CCS->GradientZ[2]     =
                CCS->GradientZ[6] =
                    CCS->Corners[6] - CCS->Corners[2];
            CCS->GradientZ[3]     =
                CCS->GradientZ[7] =
                    CCS->Corners[7] - CCS->Corners[3];

            CCS->HasGradient = Irit.TRUE;
        }
 public static extern MCPolygonStruct *MCThresholdCube(MCCubeCornerScalarStruct *CCS,
                                                       double Threshold);