I created a MIP in Slicer, the contents of the .VP file are as follows:
1: 1
2: 0
3: 1
4: 0.2
5: 0
6: 1
7: 8 -94 0 4.37255859375 0 322.636962890625 1 2706 1
8: 4 -94 1 161 1
9: 16 -94 0 0 1 4.37255859375 0 0 1 322.636962890625 0 0 1 2706 0 0 1
I would now like to use the exact same MIP settings in plain Pyhon, however, I can’t seem to be able to achieve the same results. I was able to extract Scalar Opacity Mapping from line 7 and Scalar Color Mapping from line 9:
Scalar Opacity Mapping
self.opacityTransferFunction.AddPoint(-94.0, 0.0)
self.opacityTransferFunction.AddPoint(4.37, 0.0)
self.opacityTransferFunction.AddPoint(322.64, 1)
self.opacityTransferFunction.AddPoint(2706.0, 1)
Scalar Color Mapping
self.colorTransferFunction.AddRGBPoint(-94.0, 0.0, 0.0, 1.0)
self.colorTransferFunction.AddRGBPoint(4.37, 0.0, 0.0, 1.0)
self.colorTransferFunction.AddRGBPoint(322.64, 0.0, 0.0, 1.0)
self.colorTransferFunction.AddRGBPoint(2706.0, 0.0, 0.0, 1.0)
What’s encoded in the other lines and is there any piece of (Python) code that reads in a .VP file and applies its settings?