[vtkusers] VTK newbie: please help_vtkOBJReader & vtkBandedPolyDataContourFilter problem
PsyVis
osue80 at bangor.ac.uk
Fri Oct 3 06:08:20 EDT 2008
Hello
I'm using the BandedContour Filter in java, I've used exactly the same
procedure as you (
bcf = new vtkBandedPolyDataContourFilter();
bcf.SetInput(part.GetOutput()); // comes from the reader
bcf.GenerateValues(50, part.GetOutput().GetScalarRange());
bcf.SetScalarModeToValue();
bcf.GenerateContourEdgesOn();
vtkPolyDataMapper edgeMapper = new vtkPolyDataMapper();
edgeMapper.SetInput(bcf.GetContourEdgesOutput());
)
, but the only thing I didn't do was the:
bcf3.Update();
Try getting rid of that update line and see if it works
Rich
shajay wrote:
>
> Hello all,
>
> I was trying to generate banded contours on an imported mesh(.OBJ).
> (albeit without much success)
>
> vtkOBJReader *reader1=vtkOBJReader::New();
> reader1->SetFileName(VTK_DATA_ROOT "test.obj");
> reader1->UpdateWholeExtent();
>
> vtkBandedPolyDataContourFilter *bcf3 =
> vtkBandedPolyDataContourFilter::New();
> bcf3->SetInputConnection(reader1->GetOutputPort());
> bcf3->Update();
> bcf3->GenerateValues(5, reader1->GetOutput()->GetScalarRange());
> bcf3->SetScalarModeToIndex();
> bcf3->GenerateContourEdgesOn();
>
> .........etc.
> this produces the following no input data error:
> ERROR: In ..\..\vtk-5.2.0\Graphics\vtkBandedPolyDataContourFilter.cxx,
> line 233
> vtkBandedPolyDataContourFilter (04D6AF38): No input data!
>
> The error is the same if a replace the OBJreader with an STLreader.
> I also tried parse the files myself constructing a vtkPolyData object and
> use
> obj->setPoints ()
> obj->setPolys().
>
> the error is still the same.
>
> Does the vtkBandedContourFilter require a very specific kind of polygon
> information?
>
> Thanks in advance,
>
> Any help will be much appreciated.
>
> shajay.
>
--
View this message in context: http://www.nabble.com/VTK-newbie%3A-please-help_vtkOBJReader---vtkBandedPolyDataContourFilter--problem-tp19782682p19795028.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list