<div dir="ltr">Hi Liu Peng,<div><br></div><div>W<span style="font-size:12.8px">hat versions of VTK and vtk-dicom you are using?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px"> - David  </span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 28, 2017 at 12:31 AM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, David,<br></div><div><br></div>
 <span>
 </span>
As far as I know, in the RCS system, the direction of Z axis is from foot to head.So by default, the slice order in your dicom reader is consistent with the RCS system.When the reader sorts the slices, does it consider the Patient Postion tag(0080,5100)? Some doctors might use some DICOM tools which the slice order is from head to foot and get used to that.<br><br>My code block for load slices is as follow:<br><br>       vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New();<br>        vtkDICOMFilePaths-><wbr>SetNumberOfValues(<wbr>aDICOMFilePaths->Length);<br>        for(int i = 0; i < aDICOMFilePaths->Length; i ++)<br>        {<br>            String^ filePath = aDICOMFilePaths[i];<br>            const char* filePathByChars = MDKStringUtility::<wbr>NStringToChars(filePath);<br><br>            vtkDICOMFilePaths->SetValue(i, filePathByChars);<br>        }<br><br>        vtkDICOMReader* reader = vtkDICOMReader::New();<br>        vtkImageData* imageData = reader->GetOutput();<br><br>Thanks<br>Liu Peng<br>        在2017-08-28,"David Gobbi" <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> 写道:
        <blockquote id="m_3909642038269937258isReplyContent" style="padding-left:1ex;margin:0px 0px 0px 0.8ex;BORDER-LEFT:#ccc 1px solid">
        -----原始邮件-----<br>
        <b>发件人:</b>"David Gobbi" <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> <br>
        <b>发送时间:</b>2017年08月28日 星期一<br>
        <b>收件人:</b>"Liu_tj" <<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>><br>
        <b>抄送:</b>"vtkusers" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
        <b>主题:</b>Re: What ditermines whether the slice order should be reversed?<div><div class="h5"><br>
<br><div dir="ltr">Hi Liu Peng,<div><br></div><div>The vtkDICOMReader sorts according to the Image Plane Module:</div><div><a href="http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html" target="_blank">http://dicom.nema.org/MEDICAL/<wbr>dicom/current/output/chtml/<wbr>part03/sect_C.7.6.2.html</a></div><div>That is, the slices are sorted in a manner such that the VTK image data has a right-handed coordinate system (called an RCS in the link above).</div><div><br></div><div>Sorting the slices to get an RCS means that sometimes the slices will be sorted the same as the InstanceNumber, and sometimes they will be sorted opposite to InstanceNumber, depending on the order in which scanner ordered the slices.</div><div><br></div><div>You can perform the sorting yourself by calling reader->SortingOff().  If Sorting is Off, the reader will take the slices in the same order as the vtkStringArray that you passed to reader->SetFileNames().</div><div><br></div><div>If you send me the block of code where you set up and call the reader, then I might be able to provide more help.  Don't forget to also say what versions of VTK and vtk-dicom you are using.</div><div><br></div><div>Cheers,</div><div> - David</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj <span dir="ltr"><<a href="mailto:tjlp@netease.com" target="_blank">tjlp@netease.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,</div><div><br></div><div>I have a question about the DICOM slice order. I use the DICOM reader by David Gobbi to read the slice series to vtkImageData. And I found that the oder is the same as the order by DICOM instanceNumber tag. However, some doctors tell me that the order should be reversed because the scan should start from head to foot. <br></div><div><br></div><div>@David, if I need to reverse, how to achieve that by your DICOM reader?</div><div><br></div><div>Thanks</div><div>Liu Peng<br></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div>
</div></div></blockquote><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br></div></div>