<div dir="ltr">Hi Ang,<div><br></div><div>If I was going to use memory mapping to read a DICOM file, then I wouldn't use vtkDICOMReader. The whole point of memory mapping is to _avoid_ using a traditional file reader.</div><div><br></div><div>Instead, I would use vtkDICOMParser to find out where in the file the PixelData starts, and then I would directly memory-map the PixelData from disk. This requires the use of uncompressed DICOM images, of course.</div><div><br></div><div>Or, if you need to map multiple files as one contiguous block of memory (e.g. for vtkImageReslice), then you can do what I suggested earlier in this thread: combine the PixelData from all those files into one large flat file, and then memory-map the new file.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 11, 2017 at 9:05 PM, Ang <span dir="ltr"><<a href="mailto:ysa0829@gmail.com" target="_blank">ysa0829@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
Could you give me advanced tips for memory mapping file ?<br>
<br>
in my understanding, the process is<br>
<br>
vtkDICOMReader(retrieve pixel data) => CreateFileMapping => MapViewOfFile<br>
=> put the pixel data into File => OpenFileMapping => MapViewOfFile =><br>
vtkImageImport => vtkImageReslice<br>
<br>
Is it correct?</blockquote></div></div></div></div>