[vtkusers] Reading files - 'System.TypeLoadException'
Markus Henningsson
marhe346 at student.liu.se
Wed Aug 8 09:57:17 EDT 2007
Hi,
I have some trouble reading files, any file really, as I always get this 'System.TypeLoadException' when I try to execute something. This goes for vtkImageReader2 as well as vtkVolumeReader. Anyone experienced anything similar and know how to deal with it? I'll include a piece of code just to show you (in case I screwed up with that) although I don't know if it's of any help:
#include "vtkDICOMImageReader.h"
#include "vtkImageViewer.h"
int _tmain(){
vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
reader->SetFileName("C:/VTKData/Data/mr.001");
vtkImageViewer *viewer = vtkImageViewer::New();
viewer->SetInput(reader->GetOutput());
viewer->Render();
viewer->Delete();
reader->Delete();
return 0;
}
Thanks,
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070808/152eb89a/attachment.htm>
More information about the vtkusers
mailing list