#!/Users/Matt/Code/imaging/ParaView_build/bin/pvpython

from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

RenderView1 = CreateRenderView()
RenderView1.LightSpecularColor = [1.0, 1.0, 1.0]
RenderView1.KeyLightAzimuth = 10.0
RenderView1.UseTexturedBackground = 0
RenderView1.UseLight = 1
RenderView1.CameraPosition = [45198.650499895266, 12853.152052727475, 25807.34105416313]
RenderView1.FillLightKFRatio = 3.0
RenderView1.Background2 = [0.0, 0.0, 0.165]
RenderView1.FillLightAzimuth = -10.0
RenderView1.LODResolution = 50.0
RenderView1.BackgroundTexture = []
RenderView1.InteractionMode = '3D'
RenderView1.StencilCapable = 1
RenderView1.LightIntensity = 1.0
RenderView1.CameraFocalPoint = [5598.261230468716, 6532.470214843737, 7494.9999999999445]
RenderView1.ImageReductionFactor = 2
RenderView1.CameraViewAngle = 30.0
RenderView1.CameraParallelScale = 11410.02720909947
RenderView1.EyeAngle = 2.0
RenderView1.HeadLightKHRatio = 3.0
RenderView1.StereoRender = 0
RenderView1.KeyLightIntensity = 0.75
RenderView1.BackLightAzimuth = 110.0
RenderView1.OrientationAxesInteractivity = 0
RenderView1.UseInteractiveRenderingForSceenshots = 0
RenderView1.UseOffscreenRendering = 0
RenderView1.Background = [1,1,1]
RenderView1.UseOffscreenRenderingForScreenshots = 0
RenderView1.NonInteractiveRenderDelay = 2
RenderView1.CenterOfRotation = [5598.26123046875, 6532.47021484375, 7495.0]
RenderView1.CameraParallelProjection = 0
RenderView1.CompressorConfig = 'vtkSquirtCompressor 0 3'
RenderView1.HeadLightWarmth = 0.5
RenderView1.MaximumNumberOfPeels = 4
RenderView1.LightDiffuseColor = [1.0, 1.0, 1.0]
RenderView1.StereoType = 'Red-Blue'
RenderView1.DepthPeeling = 1
RenderView1.BackLightKBRatio = 3.5
RenderView1.StereoCapableWindow = 1
RenderView1.CameraViewUp = [-0.4088055658472916, -0.07407884646175701, 0.9096099899622756]
RenderView1.LightType = 'HeadLight'
RenderView1.LightAmbientColor = [1.0, 1.0, 1.0]
RenderView1.RemoteRenderThreshold = 3.0
RenderView1.CacheKey = 0.0
RenderView1.UseCache = 0
RenderView1.KeyLightElevation = 50.0
RenderView1.CenterAxesVisibility = 1
RenderView1.MaintainLuminance = 0
RenderView1.StillRenderImageReductionFactor = 1
RenderView1.BackLightWarmth = 0.5
RenderView1.FillLightElevation = -75.0
RenderView1.MultiSamples = 0
RenderView1.FillLightWarmth = 0.4
RenderView1.AlphaBitPlanes = 1
RenderView1.LightSwitch = 0
RenderView1.OrientationAxesVisibility = 1
RenderView1.CameraClippingRange = [25497.1092035318, 67528.56699881188]
RenderView1.BackLightElevation = 0.0
RenderView1.ViewTime = 0.0
RenderView1.OrientationAxesOutlineColor = [1.0, 1.0, 1.0]
RenderView1.LODThreshold = 5.0
RenderView1.CollectGeometryThreshold = 100.0
RenderView1.UseGradientBackground = 0
RenderView1.KeyLightWarmth = 0.6
RenderView1.OrientationAxesLabelColor = [1.0, 1.0, 1.0]
RenderView1.ViewSize = [800, 3000] #[width, height]

moving_segmentation_contour_1_64_vtp = XMLPolyDataReader( guiName="moving_segmentation_contour_1_64.vtp", PointArrayStatus=['MetaImage', 'Normals'], CellArrayStatus=[], FileName=['/Users/Matt/Code/imaging/registration/results/Rat28/rigid/IntermediateTransforms/CenteredRigid2DTransform/0562/moving_segmentation_contour_1_64.vtp'] )

fixed_segmentation_contour_1_64_vtp = XMLPolyDataReader( guiName="fixed_segmentation_contour_1_64.vtp", PointArrayStatus=['MetaImage', 'Normals'], CellArrayStatus=[], FileName=['/Users/Matt/Code/imaging/registration/results/Rat28/rigid/IntermediateTransforms/CenteredRigid2DTransform/0562/fixed_segmentation_contour_1_64.vtp'] )

SetActiveSource(moving_segmentation_contour_1_64_vtp)
DataRepresentation4 = Show()
DataRepresentation4.CubeAxesZAxisVisibility = 1
DataRepresentation4.SelectionPointLabelColor = [0.5, 0.5, 0.5]
DataRepresentation4.SelectionPointFieldDataArrayName = 'MetaImage'
DataRepresentation4.SuppressLOD = 0
DataRepresentation4.CubeAxesXGridLines = 0
DataRepresentation4.CubeAxesYAxisTickVisibility = 1
DataRepresentation4.CubeAxesColor = [1.0, 1.0, 1.0]
DataRepresentation4.Position = [0.0, 0.0, 0.0]
DataRepresentation4.BackfaceRepresentation = 'Follow Frontface'
DataRepresentation4.SelectionOpacity = 1.0
DataRepresentation4.SelectionPointLabelShadow = 0
DataRepresentation4.CubeAxesYGridLines = 0
DataRepresentation4.CubeAxesZAxisRange = [0.0, 1.0]
DataRepresentation4.OrientationMode = 'Direction'
DataRepresentation4.Source.TipResolution = 6
DataRepresentation4.ScaleMode = 'No Data Scaling Off'
DataRepresentation4.Diffuse = 1.0
DataRepresentation4.SelectionUseOutline = 0
DataRepresentation4.CubeAxesZTitle = 'Z-Axis'
DataRepresentation4.Specular = 0.1
DataRepresentation4.SelectionVisibility = 1
DataRepresentation4.InterpolateScalarsBeforeMapping = 1
DataRepresentation4.CubeAxesZAxisTickVisibility = 1
DataRepresentation4.Origin = [0.0, 0.0, 0.0]
DataRepresentation4.CubeAxesVisibility = 0
DataRepresentation4.Scale = [1.0, 1.0, 1.0]
DataRepresentation4.SelectionCellLabelJustification = 'Left'
DataRepresentation4.DiffuseColor = [0.0, 0.09019607843137255, 1.0]
DataRepresentation4.SelectionCellLabelOpacity = 1.0
DataRepresentation4.Source = "Arrow"
DataRepresentation4.Source.Invert = 0
DataRepresentation4.Masking = 0
DataRepresentation4.Opacity = 0.6
DataRepresentation4.LineWidth = 1.0
DataRepresentation4.MeshVisibility = 0
DataRepresentation4.Visibility = 1
DataRepresentation4.SelectionCellLabelFontSize = 18
DataRepresentation4.CubeAxesCornerOffset = 0.0
DataRepresentation4.SelectionPointLabelJustification = 'Left'
DataRepresentation4.SelectionPointLabelVisibility = 0
DataRepresentation4.SelectOrientationVectors = ''
DataRepresentation4.CubeAxesTickLocation = 'Inside'
DataRepresentation4.CubeAxesXAxisMinorTickVisibility = 1
DataRepresentation4.CubeAxesYAxisVisibility = 1
DataRepresentation4.SelectionPointLabelFontFamily = 'Arial'
DataRepresentation4.Source.ShaftResolution = 6
DataRepresentation4.CubeAxesFlyMode = 'Closest Triad'
DataRepresentation4.SelectScaleArray = ''
DataRepresentation4.CubeAxesYTitle = 'Y-Axis'
DataRepresentation4.ColorAttributeType = 'POINT_DATA'
DataRepresentation4.SpecularPower = 100.0
DataRepresentation4.Texture = []
DataRepresentation4.SelectionCellLabelShadow = 0
DataRepresentation4.AmbientColor = [1.0, 1.0, 1.0]
DataRepresentation4.MapScalars = 1
DataRepresentation4.PointSize = 2.0
DataRepresentation4.Source.TipLength = 0.35
DataRepresentation4.SelectionCellLabelFormat = ''
DataRepresentation4.Scaling = 0
DataRepresentation4.StaticMode = 0
DataRepresentation4.SelectionCellLabelColor = [0.0, 1.0, 0.0]
DataRepresentation4.Source.TipRadius = 0.1
DataRepresentation4.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation4.CubeAxesXAxisTickVisibility = 1
DataRepresentation4.SelectionCellLabelVisibility = 0
DataRepresentation4.NonlinearSubdivisionLevel = 1
DataRepresentation4.CubeAxesXAxisRange = [0.0, 1.0]
DataRepresentation4.Representation = 'Surface'
DataRepresentation4.CubeAxesYAxisRange = [0.0, 1.0]
DataRepresentation4.CustomBounds = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation4.Orientation = [0.0, 0.0, 0.0]
DataRepresentation4.CubeAxesEnableCustomAxisRange = 0
DataRepresentation4.CubeAxesXTitle = 'X-Axis'
DataRepresentation4.CubeAxesInertia = 1
DataRepresentation4.BackfaceOpacity = 1.0
DataRepresentation4.SelectionCellFieldDataArrayName = 'vtkOriginalCellIds'
DataRepresentation4.SelectionColor = [1.0, 0.0, 1.0]
DataRepresentation4.Ambient = 0.0
DataRepresentation4.SelectionPointLabelFontSize = 18
DataRepresentation4.ScaleFactor = 1499.0
DataRepresentation4.BackfaceAmbientColor = [1.0, 1.0, 1.0]
DataRepresentation4.Source.ShaftRadius = 0.03
DataRepresentation4.SelectMaskArray = ''
DataRepresentation4.SelectionLineWidth = 2.0
DataRepresentation4.CubeAxesZAxisMinorTickVisibility = 1
DataRepresentation4.CubeAxesXAxisVisibility = 1
DataRepresentation4.Interpolation = 'Gouraud'
DataRepresentation4.SelectionCellLabelFontFamily = 'Arial'
DataRepresentation4.SelectionCellLabelItalic = 0
DataRepresentation4.CubeAxesYAxisMinorTickVisibility = 1
DataRepresentation4.CubeAxesZGridLines = 0
DataRepresentation4.SelectionPointLabelFormat = ''
DataRepresentation4.SelectionPointLabelOpacity = 1.0
DataRepresentation4.BackfaceDiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation4.Pickable = 1
DataRepresentation4.CustomBoundsActive = [0, 0, 0]
DataRepresentation4.SelectionRepresentation = 'Wireframe'
DataRepresentation4.SelectionPointLabelBold = 0
DataRepresentation4.ColorArrayName = ''
DataRepresentation4.SelectionPointLabelItalic = 0
DataRepresentation4.AllowSpecularHighlightingWithScalarColoring = 0
DataRepresentation4.SpecularColor = [1.0, 1.0, 1.0]
DataRepresentation4.LookupTable = []
DataRepresentation4.SelectionPointSize = 5.0
DataRepresentation4.SelectionCellLabelBold = 0
DataRepresentation4.Orient = 0

SetActiveSource(fixed_segmentation_contour_1_64_vtp)
DataRepresentation5 = Show()
DataRepresentation5.CubeAxesZAxisVisibility = 1
DataRepresentation5.SelectionPointLabelColor = [0.5, 0.5, 0.5]
DataRepresentation5.SelectionPointFieldDataArrayName = 'MetaImage'
DataRepresentation5.SuppressLOD = 0
DataRepresentation5.CubeAxesXGridLines = 0
DataRepresentation5.CubeAxesYAxisTickVisibility = 1
DataRepresentation5.CubeAxesColor = [1.0, 1.0, 1.0]
DataRepresentation5.Position = [0.0, 0.0, 0.0]
DataRepresentation5.BackfaceRepresentation = 'Follow Frontface'
DataRepresentation5.SelectionOpacity = 1.0
DataRepresentation5.SelectionPointLabelShadow = 0
DataRepresentation5.CubeAxesYGridLines = 0
DataRepresentation5.CubeAxesZAxisRange = [0.0, 1.0]
DataRepresentation5.OrientationMode = 'Direction'
DataRepresentation5.Source.TipResolution = 6
DataRepresentation5.ScaleMode = 'No Data Scaling Off'
DataRepresentation5.Diffuse = 1.0
DataRepresentation5.SelectionUseOutline = 0
DataRepresentation5.CubeAxesZTitle = 'Z-Axis'
DataRepresentation5.Specular = 0.1
DataRepresentation5.SelectionVisibility = 1
DataRepresentation5.InterpolateScalarsBeforeMapping = 1
DataRepresentation5.CubeAxesZAxisTickVisibility = 1
DataRepresentation5.Origin = [0.0, 0.0, 0.0]
DataRepresentation5.CubeAxesVisibility = 0
DataRepresentation5.Scale = [1.0, 1.0, 1.0]
DataRepresentation5.SelectionCellLabelJustification = 'Left'
DataRepresentation5.DiffuseColor = [1.0, 0.9803921568627451, 0.0]
DataRepresentation5.SelectionCellLabelOpacity = 1.0
DataRepresentation5.Source = "Arrow"
DataRepresentation5.Source.Invert = 0
DataRepresentation5.Masking = 0
DataRepresentation5.Opacity = 0.6
DataRepresentation5.LineWidth = 1.0
DataRepresentation5.MeshVisibility = 0
DataRepresentation5.Visibility = 1
DataRepresentation5.SelectionCellLabelFontSize = 18
DataRepresentation5.CubeAxesCornerOffset = 0.0
DataRepresentation5.SelectionPointLabelJustification = 'Left'
DataRepresentation5.SelectionPointLabelVisibility = 0
DataRepresentation5.SelectOrientationVectors = ''
DataRepresentation5.CubeAxesTickLocation = 'Inside'
DataRepresentation5.CubeAxesXAxisMinorTickVisibility = 1
DataRepresentation5.CubeAxesYAxisVisibility = 1
DataRepresentation5.SelectionPointLabelFontFamily = 'Arial'
DataRepresentation5.Source.ShaftResolution = 6
DataRepresentation5.CubeAxesFlyMode = 'Closest Triad'
DataRepresentation5.SelectScaleArray = ''
DataRepresentation5.CubeAxesYTitle = 'Y-Axis'
DataRepresentation5.ColorAttributeType = 'POINT_DATA'
DataRepresentation5.SpecularPower = 100.0
DataRepresentation5.Texture = []
DataRepresentation5.SelectionCellLabelShadow = 0
DataRepresentation5.AmbientColor = [1.0, 1.0, 1.0]
DataRepresentation5.MapScalars = 1
DataRepresentation5.PointSize = 2.0
DataRepresentation5.Source.TipLength = 0.35
DataRepresentation5.SelectionCellLabelFormat = ''
DataRepresentation5.Scaling = 0
DataRepresentation5.StaticMode = 0
DataRepresentation5.SelectionCellLabelColor = [0.0, 1.0, 0.0]
DataRepresentation5.Source.TipRadius = 0.1
DataRepresentation5.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation5.CubeAxesXAxisTickVisibility = 1
DataRepresentation5.SelectionCellLabelVisibility = 0
DataRepresentation5.NonlinearSubdivisionLevel = 1
DataRepresentation5.CubeAxesXAxisRange = [0.0, 1.0]
DataRepresentation5.Representation = 'Surface'
DataRepresentation5.CubeAxesYAxisRange = [0.0, 1.0]
DataRepresentation5.CustomBounds = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation5.Orientation = [0.0, 0.0, 0.0]
DataRepresentation5.CubeAxesEnableCustomAxisRange = 0
DataRepresentation5.CubeAxesXTitle = 'X-Axis'
DataRepresentation5.CubeAxesInertia = 1
DataRepresentation5.BackfaceOpacity = 1.0
DataRepresentation5.SelectionCellFieldDataArrayName = 'vtkOriginalCellIds'
DataRepresentation5.SelectionColor = [1.0, 0.0, 1.0]
DataRepresentation5.Ambient = 0.0
DataRepresentation5.SelectionPointLabelFontSize = 18
DataRepresentation5.ScaleFactor = 1499.0
DataRepresentation5.BackfaceAmbientColor = [1.0, 1.0, 1.0]
DataRepresentation5.Source.ShaftRadius = 0.03
DataRepresentation5.SelectMaskArray = ''
DataRepresentation5.SelectionLineWidth = 2.0
DataRepresentation5.CubeAxesZAxisMinorTickVisibility = 1
DataRepresentation5.CubeAxesXAxisVisibility = 1
DataRepresentation5.Interpolation = 'Gouraud'
DataRepresentation5.SelectionCellLabelFontFamily = 'Arial'
DataRepresentation5.SelectionCellLabelItalic = 0
DataRepresentation5.CubeAxesYAxisMinorTickVisibility = 1
DataRepresentation5.CubeAxesZGridLines = 0
DataRepresentation5.SelectionPointLabelFormat = ''
DataRepresentation5.SelectionPointLabelOpacity = 1.0
DataRepresentation5.BackfaceDiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation5.Pickable = 1
DataRepresentation5.CustomBoundsActive = [0, 0, 0]
DataRepresentation5.SelectionRepresentation = 'Wireframe'
DataRepresentation5.SelectionPointLabelBold = 0
DataRepresentation5.ColorArrayName = ''
DataRepresentation5.SelectionPointLabelItalic = 0
DataRepresentation5.AllowSpecularHighlightingWithScalarColoring = 0
DataRepresentation5.SpecularColor = [1.0, 1.0, 1.0]
DataRepresentation5.LookupTable = []
DataRepresentation5.SelectionPointSize = 5.0
DataRepresentation5.SelectionCellLabelBold = 0
DataRepresentation5.Orient = 0

Render()

WriteImage("/Users/Matt/Documents/DPhil/written_work/thesis/Ch6/Figs/diagnostics/0562_contour.png")

