It’s quite easy. The camera position can be accessed and changed when plotting in vtki
under the camera_position
attribute of the plotter. Also, there are several convenience functions to view common perspectives (e.g. .view_xy()
). Perhaps you’d benefit from some of the examples in the docs like this one. vtki
also has a powerful background plotter that has a GUI for saving/loading camera positions.
vtki
data objects are subclasses of VTK data objects so any vtki
data object will work seamlessly with VTK as we only provide a wrapping on top of the VTK data object. This wrapping doesn’t alter or convert the data, it simply provides numpy array access and convenience functions to get information from the dataset. There’s no need to “obtain the data object” as the vtki
objects are instances of VTK data objects and can be treated as such.
Could you be more specific? The code you show should run and produce a visualization without error. If you’d like to apply the texture, you’ll have to do a bit more if using VTK for the rendering… try passing the texture you loaded to the actor: Actor.SetTexture(texture)
and Mapper.SetScalarModeToUsePointFieldData()