How to volume rendering raw file what was wrrite by C++ stl;

I was write a raw file liking this:

unsigned long FileSize = 0;//height * width * slices;
const Uint16* FileData = new Uint16(FileSize);
metaInfo->findAndGetUint16Array(DCM_PixelData, FileData, &FileSize);
//_strFileName a raw file name like xxx.raw
std::fstream myFileStream(_strFileName.c_str(), std::ios::binary | std::ios::out);
if (myFileStream.is_open())
	myFileStream.write((char*)FileData, FileSize * sizeof(Uint16));

delete FileData;

Now I want to read the raw data and rendering it . How should i do ? any suggistions.


Can you please enclose your code between a ```cpp and a ```? This way you make it way more readable.