[vtkusers] What ditermines whether the slice order should be reversed?

Liu_tj tjlp at netease.com
Mon Aug 28 02:31:51 EDT 2017


Hi, David,



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.

My code block for load slices is as follow:

       vtkStringArray* vtkDICOMFilePaths = vtkStringArray::New();
        vtkDICOMFilePaths->SetNumberOfValues(aDICOMFilePaths->Length);
        for(int i = 0; i < aDICOMFilePaths->Length; i ++)
        {
            String^ filePath = aDICOMFilePaths[i];
            const char* filePathByChars = MDKStringUtility::NStringToChars(filePath);

            vtkDICOMFilePaths->SetValue(i, filePathByChars);
        }

        vtkDICOMReader* reader = vtkDICOMReader::New();
        vtkImageData* imageData = reader->GetOutput();

Thanks
Liu Peng
在2017-08-28,"David Gobbi" <david.gobbi at gmail.com> 写道: -----原始邮件-----
发件人:"David Gobbi" <david.gobbi at gmail.com>
发送时间:2017年08月28日 星期一
收件人:"Liu_tj" <tjlp at netease.com>
抄送:"vtkusers" <vtkusers at vtk.org>
主题:Re: What ditermines whether the slice order should be reversed?


Hi Liu Peng,


The vtkDICOMReader sorts according to the Image Plane Module:
http://dicom.nema.org/MEDICAL/dicom/current/output/chtml/part03/sect_C.7.6.2.html
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).


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.


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().


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.


Cheers,
 - David






On Sun, Aug 27, 2017 at 10:41 AM, Liu_tj <tjlp at netease.com> wrote:

Hi,


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.



@David, if I need to reverse, how to achieve that by your DICOM reader?


Thanks
Liu Peng





 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170828/e8995c24/attachment.html>


More information about the vtkusers mailing list