[vtkusers] vtkSmoothPolyDataFilter

Gururajan gururajan.r at raster.in
Mon Aug 3 07:58:26 EDT 2009


Hi all,

On execution of my application, am getting below error. Ane one have any clue please,

ERROR: In C:\martink\vtk42\VTK\Graphics\vtkSmoothPolyDataFilter.cxx, line 191
vtkSmoothPolyDataFilter (0x0C702B08): No data to smooth!

ERROR: In C:\martink\vtk42\VTK\Graphics\vtkPolyDataNormals.cxx, line 88
vtkPolyDataNormals (0x0C702F68): No data to generate normals for!

Thanks in advance
Guru

	vtkDICOMImageReader dicomreader = new vtkDICOMImageReader();
		dicomreader.SetDirectoryName("/home/gururaj/MANIX/MANIX/CER-CT/AVEC I.V.");
		dicomreader.Update();
		double[] dataspacing = dicomreader.GetDataSpacing();
		System.out.println(dataspacing[0] + ":" + dataspacing[1] + ":" + dataspacing[2]);
	System.out.println("Patient Ka naam : " + dicomreader.GetPatientName());	 
		 vtkImageWriter writer = new vtkImageWriter();//vtkImageWriter::New()
		 writer.SetInput(dicomreader.GetOutput());
		 writer.SetFilePrefix("/home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/Raw/dicom");
		 writer.SetFilePattern("%s%3d.raw");
		 writer.Write();
		  
		 vtkVolume16Reader v16 = new vtkVolume16Reader();
		 v16.SetDataByteOrderToLittleEndian();
		 v16.SetFilePrefix("/home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/Raw/");
		 v16.SetFilePattern("%s%3d.dcm.raw");
		 v16.SetImageRange(0, 123);
		 v16.GetOutput().ReleaseDataFlagOn();
		 v16.SetDataSpacing(dicomreader.GetDataSpacing());
		 v16.SetDataDimensions(dicomreader.GetOutput().GetDimensions());
		 v16.Update();
		 
		 vtkImageGaussianSmooth GaussianSmooth = new vtkImageGaussianSmooth();
		  GaussianSmooth.SetInput(v16.GetOutput());
		  GaussianSmooth.SetDimensionality (3);
		  GaussianSmooth.SetStandardDeviations(0.0,4.0);
		  vtkContourFilter skinExtractor = new vtkContourFilter();
		  skinExtractor.SetInput((vtkDataSet)GaussianSmooth.GetOutput());
		     skinExtractor.SetValue(0, 500);
		  skinExtractor.Update();
		  vtkSmoothPolyDataFilter smoother=new vtkSmoothPolyDataFilter();
		  smoother.SetInput(skinExtractor.GetOutput());
		  smoother.SetNumberOfIterations(70);
		     vtkPolyDataNormals skinNormals = new vtkPolyDataNormals();
		  skinNormals.SetInput(smoother.GetOutput());
		     skinNormals.SetFeatureAngle(60.0);

		  vtkPolyDataWriter pdw=new vtkPolyDataWriter();
		  pdw.SetInput(skinNormals.GetOutput());
		  pdw.SetFileName("/home/gururaj/eclipse Project/SimpleVTK/SimpleVtk/CardiacCT/out.vtk");
		  pdw.Write();






More information about the vtkusers mailing list