Code: unsigned char *m_pVolumeData; m_pVolumeData = new unsigned char[m_nSizeX * m_nSizeY * m_nSizeZ]; FILE *fp = fopen(filename, "rb"); if(fp) { fread(m_pVolumeData, 1, m_nSizeX * m_nSizeY * m_nSizeZ, fp); fclose(fp); } unsigned char *pSrcPixels = new unsigned char[m_nSizeX * m_nSizeY]; for(int m=0; m<m_nSizeX * m_nSizeY; m++) { //copy the value to psrcpixels //is this the correct way to assign the value to another array?? pSrcPixels[m] = m_pVolumeData[sliceNo * (m_nSizeX * m_nSizeY)+m]; } Hi, like to check with you all. Whether within the for loop, assigning the values are correct? I was to assign the value of m_pVolume to pSrcPixels but it doesnt seem to assign it correct. Pls help.