[vtkusers] Invoke vtkDataSetAlgorithm::SetNumberOfInputPorts from Java

Matthias Baitsch matthias.baitsch at ruhr-uni-bochum.de
Wed Mar 23 08:15:27 EST 2005


Hello,

currently I am developing a filter in Java by subclassing 
vtkProgrammableFilter. The purpose of the filter is to generate a solid 
representation of line like elements that are defined by two points and 
a cross section. Therefore, the filter takes as input one vtkPolyData 
object for the lines and a second one for the sections.

In order to make pipeline execution for the sections work, I have to (as 
far as I understood) add the corresponding polydata object as input to 
the filter using AddInput(int, vtkObject). For that, I must invoke 
SetNumberOfInputPorts(2) method in before (like in the constructor of 
vtkGlyph3D). Unfortunately this method is protected in C++ and 
(therefore ?) not wrapped in Java.

I manually introduced a public method that invokes SetNumberOfInputPorts 
in vtkProgrammableFilter.h and compiled VTK again. Now my code works but 
I don't think that's a solution. Any ideas?

I'm using the nightly release of the day before yesterday on WinXP.

Thanks,
Matthias

-- 
----------------------------------------------------------
Dr.-Ing. Matthias Baitsch
Ruhr-Universität Bochum
Fakultät für Bauingenieurwesen
Gebäude IA 6/144
D-44780 Bochum

Tel.   : +49-(0)234-32-26175
Fax    : +49-(0)234-32-06175
Email  : matthias.baitsch at ruhr-uni-bochum.de
----------------------------------------------------------



More information about the vtkusers mailing list