//The conditions to calculate data
 private CL.tagDataCond tagDataCondition()
 {
     CL.tagDataCond cond_d = default(CL.tagDataCond);
     cond_d.lower_enable    = 1;
     cond_d.lower_item      = 1;
     cond_d.lower_threshold = 3;
     cond_d.resolution      = 0;
     return(cond_d);
 }
        private Boolean getAllData()
        {
            int ret = 0;

            // Get image data
            log("Start getting image data . . . ", 1);
            CL.tagDataCond     cond_d    = tagDataCondition();
            CL.tagGetDataParam paramArea = tagGetParam();
            hash.Clear();
            ranges.Clear();

            for (int j = CL.VALTYPE_X; j <= CL.VALTYPE_PURITY; j++)
            {
                if (j == CL.VALTYPE_TCP_JIS || j == CL.VALTYPE_DUV_JIS)
                {
                    continue;
                }
                float[] pData = new float[CL.MAXDATAROW * CL.MAXDATACOL];

                //Set the conditions to calculate data
                cond_d.valueType = (short)j;
                ret = CL.CA2DSDK_SetDataCondition(ref cond_d);
                if ((ret < 0))
                {
                    log("Set data condition for " + j.ToString(), ret);
                    return(false);
                }

                //Get the data for the specified area
                ret = CL.CA2DSDK_GetAreaData(ref paramArea, pData);
                if ((ret < 0))
                {
                    log("Get area data for " + j.ToString(), ret);
                    return(false);
                }

                // Remove and flag over and under error pixels
                for (int z = 0; z < CL.MAXDATACOL * CL.MAXDATAROW; z++)
                {
                    pData[z] = pixelUO(pData[z], j);
                }
                hash.Add(j, pData);
            }
            log("Get image data completed", 1);
            return(true);
        }