[Paraview] Unexpected measurement appears in 5.4.1 but not 5.0.1

Joe Ping-Lin Hsiao phsiao at cs.unc.edu
Tue Jan 23 15:31:13 EST 2018


The attached image shows the unexpected measure with text. I tested two
versions of ParaView and it only happens in 5.4.1 but not 5.0.1.

180 stacks are loaded and set to volume rendering by my Python script,
which is also attached.

Thanks,
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://paraview.org/pipermail/paraview/attachments/20180123/4291dcda/attachment-0001.html>
-------------- next part --------------
# For ParaView 5.0.1

folder = "D:\\Joe\\data\\volume_scan\\5_split_channels\\liveCell_with_bead00147_561_primary_first_15_cut\\"

import os
fileList = os.listdir(folder)
step = 1.0 / len(fileList)
def loadFile(file, spacing):
	#file: 'D:\\joe\\a.tif'
	#spacing: [1, 1, 4]
	#return: [renderView, reader]
	
	# create a new 'TIFF Series Reader'
	tif = TIFFSeriesReader(FileNames=[file])
	tif.UseCustomDataSpacing = 1
	tif.CustomDataSpacing = spacing
	# get active view
	renderView = GetActiveViewOrCreate('RenderView')
	# uncomment following to set a specific view size
	# renderView1.ViewSize = [682, 521]
	# show data in view
	display = Show(tif, renderView)
	# trace defaults for the display properties.
	#display.Representation = 'Outline'
	# reset view to fit data
	display.SetRepresentationType('Volume')
	renderView.ResetCamera()
	# update the view to ensure updated data information
	renderView.Update()
	Hide(tif, renderView)
	return [renderView, tif]
def applyGaussian(renderView, reader):
	# create a new 'Gaussian Resampling'
	gaussianResampling = GaussianResampling(Input=reader)
	# show data in view
	gaussianResamplingDisplay = Show(gaussianResampling, renderView)
	# trace defaults for the display properties.
	#gaussianResamplingDisplay.Representation = 'Outline'
	# hide data in view
	#Hide(reader, renderView)
	# update the view to ensure updated data information
	#renderView.Update()
	# set scalar coloring
	#ColorBy(gaussianResamplingDisplay, ('POINTS', 'SplatterValues'))
	# rescale color and/or opacity maps used to include current data range
	#gaussianResamplingDisplay.RescaleTransferFunctionToDataRange(True, True)
	# change representation type
	gaussianResamplingDisplay.SetRepresentationType('Volume')
	# get color transfer function/color map for 'SplatterValues'
	#splatterValuesLUT = GetColorTransferFunction('SplatterValues')
	# hide data in view
	Hide(gaussianResampling, renderView)

for i in range(len(fileList)):
	out = loadFile(folder + fileList[i], [1, 1, 2.5])
	#applyGaussian(*out)	
	k0 = CompositeKeyFrame(Interpolation="Boolean")
	k0.KeyTime = 0
	k0.KeyValues = 0
	k1 = CompositeKeyFrame(Interpolation="Boolean")
	k1.KeyTime = step * i
	k1.KeyValues = 1
	k2 = CompositeKeyFrame(Interpolation="Boolean")
	k2.KeyTime = step * (i + 1)
	k2.KeyValues = 0
	track = GetAnimationTrack("Visibility")
	if i == 0:
		track.KeyFrames = [k1, k2]
	elif i == len(fileList) - 1:
		track.KeyFrames = [k0, k1]
	else:
		track.KeyFrames = [k0, k1, k2]

scene = GetAnimationScene()
scene.NumberOfFrames = len(fileList) + 1
scene.GoToFirst()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pv_unexpcted_measure.png
Type: image/png
Size: 427830 bytes
Desc: not available
URL: <https://paraview.org/pipermail/paraview/attachments/20180123/4291dcda/attachment-0001.png>


More information about the ParaView mailing list