internal ResponseCurve(int idx, int ChannelCount) { //Measurement unit signature (4 bytes) CurveType = (CurveMeasurementEncodings)Helper.GetUInt32(idx); //Counts of measurements in response arrays MeasurmentCounts = new int[ChannelCount]; int end = idx + 4 + 4 * ChannelCount; int c = 0; for (int i = idx + 4; i < end; i += 4) { MeasurmentCounts[c] = (int)Helper.GetUInt32(i); c++; } //PCSXYZ values XYZvalues = new XYZnumber[ChannelCount]; int start = end; end += 12 * ChannelCount; c = 0; for (int i = start; i < end; i += 12) { XYZvalues[c] = new XYZnumber(i); c++; } //Response arrays int p = MeasurmentCounts.Sum(); ResponseArrays = new Response16Number[p]; start = end; end += 8 * p; c = 0; for (int i = start; i < end; i += 8) { ResponseArrays[c] = new Response16Number(i); c++; } }