[vtkusers] VTK without the V(isualization)

Brian Davis bitminer at gmail.com
Tue Jan 31 17:40:48 EST 2017

I understand that VTK is all about visualization (the V), however I am
working on an app that uses VTK in the background and never shows a
renderwindow.  Ok well not quite true as it can/should also be capable of
rendering the same pipleine/steps as the app can also be run with
visualization and manual interaction rendering.  So the app should be
capable with the V and without the V ideally with little to no changes.

Problem I seem to be running into is that some of the code to create say
clip planes using a vtkBoxWidget is not possible without a render window or
inter actor as is my understanding.  When trying to find non visual
"replacements" such as using vtkBoxRepresentation or vtkBox or (put
whatever option here) the api does not seem to have a similar or same api
interface such as GetPlanes() for what I think may be non visual

So If i use vtkBoxWidget in the V mode.

boxWidget = vtkSmartPointer<vtkBoxWidget>::New();

It works great.  Then I look for a GetPlanes() replacemnt in non V mode here


and find:

GetPlanes() : vtkBoxRepresentation , vtkBoxWidget , vtkClipConvexPolyData ,

so I try

box = vtkSmartPointer<vtkBoxRepresentation>::New();

and I then get a bizarre warning as at the error window:
Generic Warning: in C\yada\yada\VTK\Rendering\Core\vtkPropety.cxx, line 45
Error: no override found for vtkProperty

The odd part is that at one point I could use vtkBoxRepresentation as a
replacement in the past as it worked.This seems as though I am trying to
create an abstract class or something.

as stack trace yeilds:

>    mydll.dll!vtkSmartPointer<vtkBoxRepresentation>::New() Line 117    C++

where 117 in vtkSmartPointer.h is:

  // Description:
  // Create an instance of a VTK object.
  static vtkSmartPointer<T> New()
117:    return vtkSmartPointer<T>(T::New(), NoReference());


     vtkInteractionWidgets-7.0.dll!000007fed708f9ba()    Unknown

before finally going kittywampus at:

     vtkInteractionWidgets-7.0.dll!000007fed708f9ba()    Unknown

Is there any advice for using VTK in both modes "visualized" and "not
Visualized" and just using it as a non visual processing pipeline.

If I try using vtkBox inplace of vtkBoxWidget then I have to start
diverging from the original code pipeline and use AddBounds and what ever
the replacement would be for GetPlanes(clipFunc).

Any thoughts on the problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170131/e5b2ec50/attachment.html>

More information about the vtkusers mailing list