[vtkusers] vtkSmoothPolyDataFilter
Gururajan
gururajan.r at raster.in
Mon Aug 3 08:18:29 EDT 2009
Yup, you are right, i place an update in vtkImageGaussianSmooth, but
even now, it hits me the same,
Thanks
Guru
Dominik Szczerba wrote:
> you probably missing Update() somewhere...
>
> Gururajan wrote:
>> 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();
>>
>>
>>
>> _______________________________________________
>> 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
>>
>
>
More information about the vtkusers
mailing list