which works in some cases. However, when I zoom in or out before the calls manually so that the camera position is significantly different than the position I want to set, the view stays black after the calls. Only when I start to rotate the view afterwards manually, it gets updated and shows the correct angle. Is there any way to force an update?
Yes, ResetClippingRange is a good point, you need that.
OrthogonalizeViewUp discards current camera ViewUp vector value. So, if you care what is up direction in the view then you need to set ViewUp properly (and don’t call OrthogonalizeViewUp); if it does not matter which way is up in the view then just call OrthogonalizeViewUp (and don’t call SetViewUp). See details in vtkCamera source code.
This is called by setViewUp(...) -> ComputeViewTransform() -> Transform->SetupCamera(...)
The call to OrthogonalizeViewUp() is required to retrieve back the orthogonalized vector from the transform for retrieving it via GetViewUp() and for the convenience methods like Pitch, Roll, Yaw, ...
That’s correct. That’s why you don’t need to call both SetViewUp() and OrthogonalizeViewUp().
Note that the built-in very simplistic orthogonalization method should only be used for small angular deviations. If view up direction is nearly parallel to the view normal then the result is undefined.
In the cited VTK User guide example the OrthogonalizeViewUp call is unnecessary, but since the user guide is not maintained anymore, we cannot submit a PR to fix it. VTK textbook is still maintained, you can find up-to-date version here.