[vtkusers] error message reading (Mac-created?) DICOM files in a Windows app

Steven Chall stevec at renci.org
Mon Jan 31 11:11:09 EST 2011


I've written an app (using Windows 7 Enterprise 32-bit, Visual Studio 2010, Qt 4.7.1, and VTK 5.6.1) that opens and displays directories of DICOM files (which I've received from a collaborator who works on a Mac).   When  I run this code segment

     vtkImageViewer2 *queryCTImageViewer= vtkImageViewer2::New();
      vtkDICOMImageReader *queryDICOMReader = vtkDICOMImageReader::New();
      queryDICOMReader->SetDirectoryName("C:\\Users\Steve\\Documents\\IMRT\\CT\\Patient013\\Primary");
      queryDICOMReader->Update();
      queryCTImageViewer->SetInputConnection(queryDICOMReader->GetOutputPort());
      queryCTImageViewer->SetSlice(slice);  // slice is some valid integer slice number

      queryCTImageViewer->Render();

I get the following error message:

ERROR: In ..\..\IO\vtkDICOMImageReader.cxx, line 119
vtkDICOMImageReader (03110268): DICOMParser couldn't parse : C:\Users\Steve\Documents\IMRT\CT\Patient013\Primary/.DS_Store

after which the code successfully opens and displays all the files in the named directory, all slices and all orientations.  I'm aware that the ".DS_Store" part is a Macintosh phenomenon, and I've used the debugger in trying to find where that substring is appended to the directory path, but thus far haven't been able to pinpoint the spot where it occurs.  My hypothesis is that there's something in the CT files that identifies them as having been generated on a Mac,  but I'm a noob with CT data and there's nothing visible when trying to look at sample file contents (they being binary, after all).  I'd like to find out how to stop the append from occurring, and thus eliminate the cumbersome error message generation.  In the meantime I'm going to go back in and try to work through the many lines of assembly language that come up when I attempt to locate the problem, but I'd appreciate any suggestions from someone who's familiar with this territory. Thanks.

-Steve Chall
 Senior Research Software Developer
 Renaissance Computing Institute (RENCI)
 Phone: 919-681-9639
 Email: stevec at renci.org<mailto:stevec at renci.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110131/515a2dda/attachment.htm>


More information about the vtkusers mailing list