Read image data from RAM

Thanks for the reply. This is nice but might not be exactly what I am looking for. I can change the dicom non-original formats (for example jpeg lossless) to the standard original format myself. But to input the data to the vtk dicom reader, I have to save the data as files on the hard and then read them through the vtk dicom reader (exactly the code that you mentioned). This is a bit time-consuming and may not be good for real-time viewing of dicom large series. What I wish to do is to read the original data obtained from the non-original formats directly from RAM (commands like memory stream or something similar). Any advice from the community is appreciated.