[vtkusers] Please help me in viewing vtk

Gururajan gururajan.r at raster.in
Wed Jul 29 14:32:37 EDT 2009


Please see the attached my java file. that is the programme i used to
read dicom series and write .vtk file. To display in 3d format. but am
not able to view in 3d format.
am getting following error

vtkPolyDataReader (0x8cdda7e8): Unrecognized file type: 

vtkStreamingDemandDrivenPipeline (0x8c1a2018): Input for connection index 0 on input port index 0 for algorithm vtkPolyDataWriter(0x8c1a3860) is of type vtkImageData, but a vtkPolyData is required.

Please have a look at my attached file

Thanks
Guru


John Drescher wrote:
> On Wed, Jul 29, 2009 at 1:40 PM, Gururajan<gururajan.r at raster.in> wrote:
>   
>> The following i used for reading dicom series and creating .vtk files. But am not able to view that created .vtk file. Please any one can help me. the following error am getting *ERROR: In /home/juju/VTK5.0/VTK/IO/vtkDataReader.cxx, line 432 vtkPolyDataReader (0x8cdda7e8): Unrecognized file type:  for file: /home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk Thanks Guru vtkDICOMImageReader dicomreader = new vtkDICOMImageReader(); dicomreader.SetDirectoryName("/home/gururaj/MANIX/MANIX/CER-CT/ANGIO CT"); dicomreader.Update(); System.out.println("File Dimension " + dicomreader.GetFileDimensionality()); vtkImageWriter writer = new vtkImageWriter();//vtkImageWriter::New() writer.SetInput(dicomreader.GetOutput()); writer.SetFileName("/home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk"); writer.SetFileDimensionality(3); writer.Update(); writer.Write(); //3d Construction String strfilename = new String(); strfilename = "/home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/Gods.vtk"; vtkPolyDataReader polyReader = new vtkPolyDataReader(); //vtkStructuredGridReader polyReader = new vtkStructuredGridReader(); polyReader.SetFileName(strfilename); polyReader.Update(); vtkPolyData polyData = new vtkPolyData(); polyData.DeepCopy(polyReader.GetOutput()); vtkPolyDataMapper polyMapper = new vtkPolyDataMapper(); polyMapper.SetInput(polyData); polyMapper.Update(); vtkActor actor = new vtkActor(); actor.SetMapper(polyMapper); actor.VisibilityOn(); vtkRenderer render = new vtkRenderer(); vtkRenderWindow renwindow = new vtkRenderWindow(); renwindow.AddRenderer(render); vtkRenderWindowInteractor renintec = new vtkRenderWindowInteractor(); renintec.SetRenderWindow(renwindow); render.AddActor(actor); render.SetBackground(0.2,0.3,0); renwindow.BordersOff(); renwindow.SetSize(500, 500); renwindow.Render(); render.ResetCamera(); renintec.Start(); _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ Follow this link to subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers
>>     
>
> Please fix your posts. They are totally unreadable in this format.
>
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090730/f0a686e1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleVTK.java
Type: text/x-java
Size: 3366 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090730/f0a686e1/attachment.java>


More information about the vtkusers mailing list