Hi all,

I want to set the representation to 'Volume' instead of 'Surface'. But the
result shows the representation is still the 'Surface' after I modified my
code as shown below. Thanks ahead for any help!

Best wishes,
Junyi Han


CODE:

    reader = OpenDataFile(VTKFile)
    reader.PointData
    view = GetRenderView()

    dp = GetDisplayProperties()
    dp.Representation = 'Volume'
    lut = CreateLookupTable()
    lut.RGBPoints  = [0.0, 0.0, 0.0, 1.0,
                        3.3, 1.0, 1.0, 1.0,
                      6.674, 1.0, 0.0, 0.0]

    readerRep = GetRepresentation()
    readerRep.ColorArrayName = 'scaler_name'
    readerRep.LookupTable = lut

    Show(reader)
    Render()

# Get a nice view angle
    if count == 0:
        cam = GetActiveCamera()
        cam.Elevation(30)
        cam.Azimuth(30)
        Render()
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to