Hi,
I tested the pipeline as follows,
1 - using original Catalyst script, i created new python script (also
includes that read part). In this case, i removed all co-processing
calls. See the attached script (dvr_pv.py). You could also compare it
with original Co-processing generated script (dvr.py).
2 - Then, i opened PV and after Tools-> Python Shell -> Run Script, i
run the dvr_pv.py
The strange thing is that it produces exactly same problematic DVR in
this case. So, it seems that problem is not related with Catalyst but it
seems related with Python interface. So, i think that this information
could narrow down the places that might cause the problem. Please let me
know, if you need more information and test.
Thanks again for your kindly help,
Regards,
--ufuk
On 04/05/16 22:37, Andy Bauer wrote:
Hi,
Are you generating the Catalyst script with PV built with the OpenGL2
backend and then linking with a version of Catalyst built with the
OpenGL1 backend? I'd guess that this is the problem.
To isolate the issue further, you can do a Python trace in the GUI to
see if you get the same issue when you run pvpython with that script.
Best,
Andy
On Fri, Apr 29, 2016 at 10:12 AM, Ufuk Utku Turuncoglu (BE)
<[email protected]
<mailto:[email protected]>> wrote:
Hi Cory,
Do you think that it is a bug in Catalyst side. In this case, i am
running the code as follows
export
LD_LIBRARY_PATH=/opt/progs/paraview-5.0.0/lib:${LD_LIBRARY_PATH}
export
DYLD_LIBRARY_PATH=/opt/progs/paraview-5.0.0/lib:${DYLD_LIBRARY_PATH}
mpirun -np 12 ./main.x
Thanks for your help,
--ufuk
On 29/04/16 16:58, Cory Quammen wrote:
It indeed looks like the scalar opacity function is not being
set up
properly when using Catalyst. Looking at your script, it looks
like it
should be, though.
Could you describe how you are running this with Catalyst?
Thanks,
Cory
On Tue, Apr 26, 2016 at 4:18 AM, Ufuk Utku Turuncoglu (BE)
<[email protected]
<mailto:[email protected]>> wrote:
Hi,
I had a problem in Catalyst when i run a visualization
pipeline with volume
rendering. The attached figures shows the problem and
belong to same
visualization with and without Catalyst. In my case, the
co-processing
Python script (dvr.py) is generated from multi-block
dataset and the
Catalyst code uses MPI code to define multi-block dataset
also. So, it is
consistent in both side. The visualization pipeline
includes Transform and
MergeBlocks filters to create the final image and mapper
is set as Bunyk Ray
Cast. It seems that there is a problem in the color
transfer function but i
am not sure. I also test with different mapper such as
projected-tetra but
the result is same. I just wonder that did you see any
similar problem
before.
Regards,
Istanbul Technical University
Informatics Institute
_______________________________________________
Powered by www.kitware.com <http://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
Search the list archives at:
http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview
_______________________________________________
Powered by www.kitware.com <http://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
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# create a new 'XML MultiBlock Data Reader'
input3d = XMLMultiBlockDataReader(FileName=['/Users/turuncu/Desktop/visESMF/input3d_0.vtm'])
# get active view
renderView1 = GetActiveViewOrCreate('RenderView')
renderView1.ViewSize = [1037, 597]
renderView1.AxesGrid = 'GridAxes3DActor'
renderView1.CenterOfRotation = [20.0, 42.6428723335266, 15.03]
renderView1.StereoType = 0
renderView1.CameraPosition = [-8.33076757039062, -80.0234925539481, 112.483629644514]
renderView1.CameraFocalPoint = [42.5981857332347, 140.488343341698, -62.7044001574549]
renderView1.CameraViewUp = [0.16119288495294204, 0.5908211757996991, 0.7905360156673501]
renderView1.CameraParallelScale = 74.0738451438048
renderView1.Background = [0.32, 0.34, 0.43]
# show data in view
#input3d_0vtmDisplay = Show(input3d_0vtm, renderView1)
# trace defaults for the display properties.
#input3d_0vtmDisplay.Representation = 'Outline'
#input3d_0vtmDisplay.ColorArrayName = [None, '']
#input3d_0vtmDisplay.GlyphType = 'Arrow'
#input3d_0vtmDisplay.ScalarOpacityUnitDistance = 168.59745675258847
#input3d_0vtmDisplay.SelectInputVectors = [None, '']
#input3d_0vtmDisplay.WriteLog = ''
# reset view to fit data
renderView1.ResetCamera()
# rename source object
#RenameSource('input3d', input3d_0vtm)
# ----------------------------------------------------------------
# setup the data processing pipelines
# ----------------------------------------------------------------
# create a new 'Transform'
transform1 = Transform(Input=input3d)
transform1.Transform = 'Transform'
# init the 'Transform' selected for 'Transform'
transform1.Transform.Scale = [1.0, 1.0, 0.003]
# create a new 'Merge Blocks'
mergeBlocks1 = MergeBlocks(Input=transform1)
# ----------------------------------------------------------------
# setup color maps and opacity mapes used in the visualization
# note: the Get..() functions create a new object, if needed
# ----------------------------------------------------------------
# get color transfer function/color map for 'rh'
rhLUT = GetColorTransferFunction('rh')
rhLUT.LockDataRange = 1
rhLUT.RGBPoints = [90.0002746582031, 0.0, 0.0, 0.0, 94.0001647949219, 0.901960784314, 0.0, 0.0, 99.5000137329102, 0.901960784314, 0.901960784314, 0.0, 100.0, 1.0, 1.0, 1.0]
rhLUT.ColorSpace = 'RGB'
rhLUT.NanColor = [0.0, 0.498039215686, 1.0]
rhLUT.ScalarRangeInitialized = 1.0
# get opacity transfer function/opacity map for 'rh'
rhPWF = GetOpacityTransferFunction('rh')
rhPWF.Points = [90.0002746582031, 0.0, 0.5, 0.0, 90.0002746582031, 1.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0]
rhPWF.ScalarRangeInitialized = 1
# ----------------------------------------------------------------
# setup the visualization in view 'renderView1'
# ----------------------------------------------------------------
# show data from mergeBlocks1
mergeBlocks1Display = Show(mergeBlocks1, renderView1)
# trace defaults for the display properties.
mergeBlocks1Display.Representation = 'Volume'
mergeBlocks1Display.ColorArrayName = ['POINTS', 'rh']
mergeBlocks1Display.LookupTable = rhLUT
mergeBlocks1Display.GlyphType = 'Arrow'
mergeBlocks1Display.ScalarOpacityUnitDistance = 2.50247341150902
mergeBlocks1Display.SelectMapper = 'Bunyk ray cast'
mergeBlocks1Display.UseOutline = 1
mergeBlocks1Display.UseBlockDetailInformation = 1
mergeBlocks1Display.DetailLevel = 1.0
mergeBlocks1Display.SelectInputVectors = [None, '']
mergeBlocks1Display.WriteLog = ''
# show color legend
mergeBlocks1Display.SetScalarBarVisibility(renderView1, True)
# setup the color legend parameters for each legend in this view
# get color legend/bar for rhLUT in view renderView1
rhLUTColorBar = GetScalarBar(rhLUT, renderView1)
rhLUTColorBar.Title = 'rh'
rhLUTColorBar.ComponentTitle = ''
from paraview.simple import *
from paraview import coprocessing
#--------------------------------------------------------------
# Code generated from cpstate.py to create the CoProcessor.
# ParaView 5.0.0 64 bits
# ----------------------- CoProcessor definition -----------------------
def CreateCoProcessor():
def _CreatePipeline(coprocessor, datadescription):
class Pipeline:
# state file generated using paraview version 5.0.0
# ----------------------------------------------------------------
# setup views used in the visualization
# ----------------------------------------------------------------
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# Create a new 'Render View'
renderView1 = CreateView('RenderView')
renderView1.ViewSize = [1037, 597]
renderView1.AxesGrid = 'GridAxes3DActor'
renderView1.CenterOfRotation = [20.0, 42.6428723335266, 15.03]
renderView1.StereoType = 0
renderView1.CameraPosition = [-8.33076757039062, -80.0234925539481, 112.483629644514]
renderView1.CameraFocalPoint = [42.5981857332347, 140.488343341698, -62.7044001574549]
renderView1.CameraViewUp = [0.16119288495294204, 0.5908211757996991, 0.7905360156673501]
renderView1.CameraParallelScale = 74.0738451438048
renderView1.Background = [0.32, 0.34, 0.43]
# register the view with coprocessor
# and provide it with information such as the filename to use,
# how frequently to write the images, etc.
coprocessor.RegisterView(renderView1,
filename='image_%t.png', freq=1, fittoscreen=0, magnification=1, width=1037, height=597, cinema={})
renderView1.ViewTime = datadescription.GetTime()
# ----------------------------------------------------------------
# setup the data processing pipelines
# ----------------------------------------------------------------
# create a new 'XML MultiBlock Data Reader'
# create a producer from a simulation input
input3d = coprocessor.CreateProducer(datadescription, 'input3d')
# create a new 'Transform'
transform1 = Transform(Input=input3d)
transform1.Transform = 'Transform'
# init the 'Transform' selected for 'Transform'
transform1.Transform.Scale = [1.0, 1.0, 0.003]
# create a new 'Merge Blocks'
mergeBlocks1 = MergeBlocks(Input=transform1)
# ----------------------------------------------------------------
# setup color maps and opacity mapes used in the visualization
# note: the Get..() functions create a new object, if needed
# ----------------------------------------------------------------
# get color transfer function/color map for 'rh'
rhLUT = GetColorTransferFunction('rh')
rhLUT.LockDataRange = 1
rhLUT.RGBPoints = [90.0002746582031, 0.0, 0.0, 0.0, 94.0001647949219, 0.901960784314, 0.0, 0.0, 99.5000137329102, 0.901960784314, 0.901960784314, 0.0, 100.0, 1.0, 1.0, 1.0]
rhLUT.ColorSpace = 'RGB'
rhLUT.NanColor = [0.0, 0.498039215686, 1.0]
rhLUT.ScalarRangeInitialized = 1.0
# get opacity transfer function/opacity map for 'rh'
rhPWF = GetOpacityTransferFunction('rh')
rhPWF.Points = [90.0002746582031, 0.0, 0.5, 0.0, 90.0002746582031, 1.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0]
rhPWF.ScalarRangeInitialized = 1
# ----------------------------------------------------------------
# setup the visualization in view 'renderView1'
# ----------------------------------------------------------------
# show data from mergeBlocks1
mergeBlocks1Display = Show(mergeBlocks1, renderView1)
# trace defaults for the display properties.
mergeBlocks1Display.Representation = 'Volume'
mergeBlocks1Display.ColorArrayName = ['POINTS', 'rh']
mergeBlocks1Display.LookupTable = rhLUT
mergeBlocks1Display.GlyphType = 'Arrow'
mergeBlocks1Display.ScalarOpacityUnitDistance = 2.50247341150902
mergeBlocks1Display.SelectMapper = 'Bunyk ray cast'
mergeBlocks1Display.UseOutline = 1
mergeBlocks1Display.UseBlockDetailInformation = 1
mergeBlocks1Display.DetailLevel = 1.0
mergeBlocks1Display.SelectInputVectors = [None, '']
mergeBlocks1Display.WriteLog = ''
# show color legend
mergeBlocks1Display.SetScalarBarVisibility(renderView1, True)
# setup the color legend parameters for each legend in this view
# get color legend/bar for rhLUT in view renderView1
rhLUTColorBar = GetScalarBar(rhLUT, renderView1)
rhLUTColorBar.Title = 'rh'
rhLUTColorBar.ComponentTitle = ''
return Pipeline()
class CoProcessor(coprocessing.CoProcessor):
def CreatePipeline(self, datadescription):
self.Pipeline = _CreatePipeline(self, datadescription)
coprocessor = CoProcessor()
# these are the frequencies at which the coprocessor updates.
freqs = {'input3d': [1, 1, 1]}
coprocessor.SetUpdateFrequencies(freqs)
return coprocessor
#--------------------------------------------------------------
# Global variables that will hold the pipeline for each timestep
# Creating the CoProcessor object, doesn't actually create the ParaView pipeline.
# It will be automatically setup when coprocessor.UpdateProducers() is called the
# first time.
coprocessor = CreateCoProcessor()
#--------------------------------------------------------------
# Enable Live-Visualizaton with ParaView
coprocessor.EnableLiveVisualization(False, 1)
# ---------------------- Data Selection method ----------------------
def RequestDataDescription(datadescription):
"Callback to populate the request for current timestep"
global coprocessor
if datadescription.GetForceOutput() == True:
# We are just going to request all fields and meshes from the simulation
# code/adaptor.
for i in range(datadescription.GetNumberOfInputDescriptions()):
datadescription.GetInputDescription(i).AllFieldsOn()
datadescription.GetInputDescription(i).GenerateMeshOn()
return
# setup requests for all inputs based on the requirements of the
# pipeline.
coprocessor.LoadRequestedData(datadescription)
# ------------------------ Processing method ------------------------
def DoCoProcessing(datadescription):
"Callback to do co-processing for current timestep"
global coprocessor
# Update the coprocessor by providing it the newly generated simulation data.
# If the pipeline hasn't been setup yet, this will setup the pipeline.
coprocessor.UpdateProducers(datadescription)
# Write output data, if appropriate.
coprocessor.WriteData(datadescription);
# Write image capture (Last arg: rescale lookup table), if appropriate.
coprocessor.WriteImages(datadescription, rescale_lookuptable=False)
# Live Visualization, if enabled.
coprocessor.DoLiveVisualization(datadescription, "localhost", 22222)
_______________________________________________
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
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview