Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
With VTK 6.3, streamlines color map bar text disappears when using streamtubes #1232
I have tested this with VTK 5.8 and the bugs does not happen, so it seems to be version specific. Here is the simple code snippet to reproduce de bug:
import numpy as np from dipy.viz import window, actor from dipy.data import fetch_bundles_2_subjects, read_bundles_2_subjects from dipy.tracking.streamline import transform_streamlines fetch_bundles_2_subjects() dix = read_bundles_2_subjects(subj_id='subj_1', metrics=['fa'], bundles=['cg.left', 'cst.right']) affine = dix['affine'] bundle = dix['cg.left'] bundle_native = transform_streamlines(bundle, np.linalg.inv(affine)) fa = dix['fa'] renderer = window.Renderer() renderer.set_camera(position=(-176.42, 118.52, 128.20), focal_point=(113.30, 128.31, 76.56), view_up=(0.18, 0.00, 0.98)) stream_actor = actor.line(bundle_native, fa, linewidth=0.1) bar = actor.scalar_bar() renderer.add(stream_actor) renderer.add(bar) window.record(renderer, out_path="streamlines.png", size=(600, 600)) renderer.clear() stream_actor = actor.streamtube(bundle_native, fa, linewidth=0.1) bar = actor.scalar_bar() renderer.add(stream_actor) renderer.add(bar) window.record(renderer, out_path="streamtubes.png", size=(600, 600))
I'm running on dipy from the master branch updated at the moment of submitting this issue.
changed the title
In VTK 6.3, Streamlines color map bar text disappears when using streamtubes
Apr 24, 2017
It seems that enabling the Backface Culling for the streamtubes is causing the problem.
I'm no expert in rendering, is the backface culling needed, what does it do exactly?
Wow! How did you guess that!? Thanks for the hint. How can colorbar labels be affected by backface culling?
Backface culling accelerates the rendering process by omitting the back faces... AND THE COLORBAR LABELS apparently. :P.
I'm not sure if it's a VTK bug or we are not doing things in the right way.