[vtkusers] Problem to read the DICOM series using VTK
David Gobbi
david.gobbi at gmail.com
Sun Jan 22 09:34:36 EST 2017
Hi James,
In the code you sent in your email, there are single backslashes after "C:"
and "temp". I tried on my computer with proper slashes, and
sorter->GetNumberOfSeries() returns 1.
- David
On Sat, Jan 21, 2017 at 11:53 PM, chenjianyyzz <chenjianyyzz at 163.com> wrote:
> Hello David,
>
> thank you very much for your reply, yes, the image result you attached is
> right.
> but in my code, I fail to GetNumberOfSeries, it return 0, below is my
> code:
> ===================================
> vtkSmartPointer<vtkStringArray> filenames =
> vtkSmartPointer<vtkStringArray>::New();
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 286.dcm");
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 287.dcm");
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 288.dcm");
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 289.dcm");
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 290.dcm");
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 291.dcm");
> filenames->InsertNextValue("C:\temp\Data_Fail_to_Read_A\\1-
> 292.dcm");
> vtkSmartPointer <vtkDICOMFileSorter> sorter = vtkSmartPointer
> <vtkDICOMFileSorter>::New();
> sorter->SetInputFileNames(filenames);
> sorter->Update();
> *int ns = sorter->GetNumberOfSeries();* // here ns returns 0,
> which
> should not be.
> ===================================
>
> and I don't know why sorter->GetNumberOfSeries() returns 0?
>
> Best Regards
> James
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170122/783c2ea8/attachment.html>
More information about the vtkusers
mailing list