[vtkusers] No data to generate normals for!!!

TABAS CALLE, MANUEL DAVID ManuelDavid.Tabas at alu.uclm.es
Tue Nov 13 11:27:50 EST 2007


With the code below, i´m tryign to read a .img (a format that have inside a stack of 40 .raw images of 159x147) and to visualize it like a 3D data set. All of this in JAVA. The error vtk shows is: "ERROR: In C:\martink\vtk42\VTK\Graphics\vtkPolyDataNormals.cxx, line 88
vtkPolyDataNormals (0x0C702AE8): No data to generate normals for!" And i don´t know where is the problem, if the .img is bad for this or i forget doing somethig. 
Thank you in advance and sorry for my English.



        vtkImageReader reader=new vtkImageReader();
        reader.SetDataScalarTypeToUnsignedChar();
        reader.SetDataByteOrderToBigEndian();
        reader.SetNumberOfScalarComponents(1);
        reader.SetFileDimensionality(3);
        reader.SetDataExtent(0,157,0,146,0,39);
        reader.SetFileName("C:/Documents and                                    Settings/Pc2/Escritorio/VTKs/prueba6.img");
        
        vtkContourFilter skinExtractor = new vtkContourFilter();
        skinExtractor.SetInput(reader.GetOutput());
        skinExtractor.SetValue(0, 255);
        
        
        vtkPolyDataNormals skinNormals = new vtkPolyDataNormals();
        skinNormals.SetInput(skinExtractor.GetOutput());
        skinNormals.SetFeatureAngle(60.0); 



___________________________________________________
Enviado a través de http://alumnos.uclm.es/webmail


 
                   




More information about the vtkusers mailing list