[vtkusers] vtkDICOMImageReader - reading ONLY the DICOM files in one folder
Mark Wyszomierski
markww at gmail.com
Mon Apr 14 08:07:38 EDT 2008
I think I ran into the same problem awhile back. I attached an error
listener to the DICOM reader, and it generates an error when a non-DICOM
file is encountered. When this happens, I would check the error and if it
was just a non-DICOM file I would continue processing. Not the best
solution, but it worked.
That was just for the demo projects I wrote, for actual image viewer stuff I
used boost or native win32 methods for recursively going through a folder
looking for only dcm files myself.
Mark
On Mon, Apr 14, 2008 at 8:03 AM, <polys_poly at hotmail.com> wrote:
> Hello,
>
> I want to read some DICOM images from a folder that also contains other
> files (not DICOM) for example .txt files. I use the following code
>
> vtkDICOMImageReader* pRead = vtkDICOMImageReader::New();
> pRead->SetDirectoryName(strPath.c_str());
> pRead->Update();
>
> But when it tries to read a .txt file for example I get error. Is there
> any way I can modify this code so I can read ONLY the DICOM images contained
> in the specific folder?
>
> Thanks in advance,
> Polys
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080414/24c87aaf/attachment.htm>
More information about the vtkusers
mailing list