From 20c898ca1db9f28ff35f625d70eae3eed83e61b0 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 6 May 2016 15:09:24 +0200 Subject: [PATCH] EDF12599 : Addition of ShrinkFactor property for ELNO Mesh filter in MEDReader. --- .../MEDReader/IO/vtkELNOMeshFilter.cxx | 4 +- src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h | 5 +- .../Resources/MEDReaderServer.xml | 11 + .../Test/Baselines/testMEDReader21.png | Bin 0 -> 19364 bytes src/Plugins/MEDReader/Test/CMakeLists.txt | 2 +- src/Plugins/MEDReader/Test/testMEDReader21.py | 191 ++++++++++++++++++ 6 files changed, 209 insertions(+), 4 deletions(-) create mode 100644 src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png create mode 100644 src/Plugins/MEDReader/Test/testMEDReader21.py diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx index a01b5d8b..62aa3e6e 100644 --- a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx +++ b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.cxx @@ -41,7 +41,7 @@ vtkStandardNewMacro(vtkELNOMeshFilter); -vtkELNOMeshFilter::vtkELNOMeshFilter() +vtkELNOMeshFilter::vtkELNOMeshFilter():ShrinkFactor(0.9999) { } @@ -71,7 +71,7 @@ int vtkELNOMeshFilter::RequestData(vtkInformation *request, usgInClone->ShallowCopy(usgIn); vtkSmartPointer shrink(vtkSmartPointer::New()); shrink->SetInputData(usgInClone); - shrink->SetShrinkFactor(0.9999); + shrink->SetShrinkFactor(this->ShrinkFactor); shrink->Update(); vtkUnstructuredGrid *shrinked(shrink->GetOutput()); usgInClone->Delete(); diff --git a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h index b3cc6038..f24958d6 100644 --- a/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h +++ b/src/Plugins/MEDReader/IO/vtkELNOMeshFilter.h @@ -29,15 +29,18 @@ public: vtkTypeMacro(vtkELNOMeshFilter,vtkUnstructuredGridAlgorithm); void PrintSelf(ostream& os, vtkIndent indent); + vtkGetMacro(ShrinkFactor, double); + vtkSetMacro(ShrinkFactor, double); protected: vtkELNOMeshFilter(); ~vtkELNOMeshFilter(); int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); - private: vtkELNOMeshFilter(const vtkELNOMeshFilter&); void operator =(const vtkELNOMeshFilter&); +private: + double ShrinkFactor; }; #endif diff --git a/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml b/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml index f4a772d6..6f751967 100644 --- a/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml +++ b/src/Plugins/MEDReader/ParaViewPlugin/Resources/MEDReaderServer.xml @@ -235,6 +235,7 @@ short_help="Create a Mesh with ELNO values mapped at each vertex."> "Create a Mesh with ELNO values mapped at each vertex." + @@ -245,6 +246,16 @@ + + + + The value of this property determines how far the points + will move in the mesh before to be colored using ELNO fields on it. A value of 0 positions the points at the centroid of the cell; a value of 1 leaves them at their original positions. + diff --git a/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png b/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png new file mode 100644 index 0000000000000000000000000000000000000000..bd87d10582b215bb78eb4a9134446d33459ef1b5 GIT binary patch literal 19364 zcmeEu>8Ky^R=1NH@}Ml!`f0ax~K2-AKt8AT2qi8_7}I z&b{Y%&b#v;ob&mx7rS>~*Y)kb_@bwydW({Y5(EO>QdfHp0f8*DnK4(#m^) zFaLtnpFe}WHs6}_OR+IXB<<~bx%uF4s%MJWaA1DFdGjyI23t%S{rtH;HZ;)y`|e45 z#!e;bGyCV83rxqWN!L-=^KJAl-TjB-#&t@p_qg29Zlu?4iD{}6axJm6l-TSVYFejb zG}%AtJXtn$kOKAn{jC>(Cxi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=S%kY*^lDIU06(4imGaV;T zEV1CU0@0)~^dsoaQO67g$fYnW=oybaSJ*3`oQz(N$a?TTMinX+e?}#I^zoz}w%!wRqIJx32MDRsQ#Q*o{@1A zD0WsP3*Wwdva*tkV8~xzk946BiNr=$_aDNfIWE}gubHF<4#5tGqavkixL>04FmNtR z9ohvtAI}RkZ?v5*-@6ATctrUs{*nl%Mx94C=oZzTwsb|19MH7pr}wC*qp! VHGiy~2OnQSXx}3~HQvWl{sC)q-(>&* literal 0 HcmV?d00001 diff --git a/src/Plugins/MEDReader/Test/CMakeLists.txt b/src/Plugins/MEDReader/Test/CMakeLists.txt index 803fe6d0..8ebef215 100644 --- a/src/Plugins/MEDReader/Test/CMakeLists.txt +++ b/src/Plugins/MEDReader/Test/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) +SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21) SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader) SET(BASELINES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Baselines") diff --git a/src/Plugins/MEDReader/Test/testMEDReader21.py b/src/Plugins/MEDReader/Test/testMEDReader21.py new file mode 100644 index 00000000..1159dd54 --- /dev/null +++ b/src/Plugins/MEDReader/Test/testMEDReader21.py @@ -0,0 +1,191 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2015-2016 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# Author : Anthony Geay (EDF R&D) + +from paraview.simple import * + +from MEDLoader import * + +""" This is a non regression EDF12599""" +fname="testMEDReader21.med" +imgName="testMEDReader21.png" +fieldName="MyField" +meshName="mesh" +m=MEDFileUMesh() +m0=MEDCouplingUMesh(meshName,1) +m0.setCoords(DataArrayDouble([(0.,0.,0),(1.,0.,0.),(2.,0.,0.)])) +m0.allocateCells() +m0.insertNextCell(NORM_SEG2,[0,1]) +m0.insertNextCell(NORM_SEG2,[1,2]) +m[0]=m0 +# +f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setName(fieldName) +f.setMesh(m0) ; f.setArray(DataArrayDouble([1.,7.,3.,2.])) +WriteField(fname,f,True) +######## +testTotomed = MEDReader(FileName=fname) +testTotomed.AllArrays = ['TS0/%s/ComSup0/%s@@][@@GSSNE'%(meshName,fieldName)] +testTotomed.AllTimeSteps = ['0000'] +# get active view +renderView1 = GetActiveViewOrCreate('RenderView') +# uncomment following to set a specific view size +# renderView1.ViewSize = [739, 503] + +# show data in view +testTotomedDisplay = Show(testTotomed, renderView1) +# trace defaults for the display properties. +testTotomedDisplay.ColorArrayName = [None, ''] +testTotomedDisplay.GlyphType = 'Arrow' +testTotomedDisplay.ScalarOpacityUnitDistance = 1.5874010519681994 +testTotomedDisplay.SelectUncertaintyArray = [None, ''] +testTotomedDisplay.UncertaintyTransferFunction = 'PiecewiseFunction' +testTotomedDisplay.OpacityArray = [None, ''] +testTotomedDisplay.RadiusArray = [None, ''] +testTotomedDisplay.RadiusRange = [0.0, 2.0] +testTotomedDisplay.ConstantRadius = 2.0 +testTotomedDisplay.PointSpriteDefaultsInitialized = 1 +testTotomedDisplay.SelectInputVectors = [None, ''] +testTotomedDisplay.WriteLog = '' + +# reset view to fit data +renderView1.ResetCamera() + +#changing interaction mode based on data extents +renderView1.InteractionMode = '2D' +renderView1.CameraPosition = [1.0, 10000.0, 10000.0] +renderView1.CameraFocalPoint = [1.0, 0.0, 0.0] +renderView1.CameraViewUp = [1.0, 1.0, 0.0] + +# set scalar coloring +ColorBy(testTotomedDisplay, ('FIELD', 'vtkBlockColors')) + +# show color bar/color legend +testTotomedDisplay.SetScalarBarVisibility(renderView1, True) + +# get color transfer function/color map for 'vtkBlockColors' +vtkBlockColorsLUT = GetColorTransferFunction('vtkBlockColors') + +# get opacity transfer function/opacity map for 'vtkBlockColors' +vtkBlockColorsPWF = GetOpacityTransferFunction('vtkBlockColors') + +# create a new 'ELNO Mesh' +eLNOMesh1 = ELNOMesh(Input=testTotomed) + +# Properties modified on eLNOMesh1 +eLNOMesh1.ShrinkFactor = 0.5 # <- test is here !!!!!!!! + +# show data in view +eLNOMesh1Display = Show(eLNOMesh1, renderView1) +# trace defaults for the display properties. +eLNOMesh1Display.ColorArrayName = [None, ''] +eLNOMesh1Display.GlyphType = 'Arrow' +eLNOMesh1Display.ScalarOpacityUnitDistance = 1.1905507889761495 +eLNOMesh1Display.SelectUncertaintyArray = ['POINTS', 'MyField'] +eLNOMesh1Display.UncertaintyTransferFunction = 'PiecewiseFunction' +eLNOMesh1Display.OpacityArray = [None, ''] +eLNOMesh1Display.RadiusArray = [None, ''] +eLNOMesh1Display.RadiusRange = [0.25, 1.75] +eLNOMesh1Display.ConstantRadius = 1.75 +eLNOMesh1Display.PointSpriteDefaultsInitialized = 1 +eLNOMesh1Display.SelectInputVectors = [None, ''] +eLNOMesh1Display.WriteLog = '' + +# hide data in view +Hide(testTotomed, renderView1) + +# set scalar coloring +ColorBy(eLNOMesh1Display, ('FIELD', 'vtkBlockColors')) + +# show color bar/color legend +eLNOMesh1Display.SetScalarBarVisibility(renderView1, False) + +# set scalar coloring +ColorBy(eLNOMesh1Display, ('POINTS', 'MyField')) + +# rescale color and/or opacity maps used to include current data range +eLNOMesh1Display.RescaleTransferFunctionToDataRange(True) + +# show color bar/color legend +eLNOMesh1Display.SetScalarBarVisibility(renderView1, False) + +# get color transfer function/color map for 'MyField' +myFieldLUT = GetColorTransferFunction('MyField') + +# get opacity transfer function/opacity map for 'MyField' +myFieldPWF = GetOpacityTransferFunction('MyField') + +# hide color bar/color legend +eLNOMesh1Display.SetScalarBarVisibility(renderView1, False) + +# create a new 'Glyph' +glyph1 = Glyph(Input=eLNOMesh1, + GlyphType='Arrow') +glyph1.Scalars = ['POINTS', 'MyField'] +glyph1.Vectors = ['POINTS', 'None'] +glyph1.ScaleFactor = 0.15000000000000002 +glyph1.GlyphTransform = 'Transform2' + +# Properties modified on glyph1 +glyph1.GlyphType = 'Sphere' +glyph1.ScaleFactor = 0.15 + +# show data in view +glyph1Display = Show(glyph1, renderView1) +# trace defaults for the display properties. +glyph1Display.ColorArrayName = ['POINTS', 'MyField'] +glyph1Display.LookupTable = myFieldLUT +glyph1Display.GlyphType = 'Arrow' +glyph1Display.SelectUncertaintyArray = ['POINTS', 'MyField'] +glyph1Display.UncertaintyTransferFunction = 'PiecewiseFunction' +glyph1Display.OpacityArray = [None, ''] +glyph1Display.RadiusArray = [None, ''] +glyph1Display.RadiusRange = [0.17688040435314178, 1.8231196403503418] +glyph1Display.ConstantRadius = 1.8231196403503418 +glyph1Display.PointSpriteDefaultsInitialized = 1 +glyph1Display.SelectInputVectors = ['POINTS', 'Normals'] +glyph1Display.WriteLog = '' + +# show color bar/color legend +glyph1Display.SetScalarBarVisibility(renderView1, True) + +#### saving camera placements for all active views + +# current camera placement for renderView1 +renderView1.InteractionMode = '2D' +renderView1.CameraPosition = [0.9999999999999908, 9999.999999999995, 9999.999999999993] +renderView1.CameraFocalPoint = [1.0, 0.0, 0.0] +renderView1.CameraViewUp = [0.6331899945158901, 0.547298104713038, -0.5472981047130381] +renderView1.CameraParallelScale = 0.6930835077290218 +renderView1.ViewSize = [739,503] + +import os +import sys +try: + baselineIndex = sys.argv.index('-B')+1 + baselinePath = sys.argv[baselineIndex] +except: + print "Could not get baseline directory. Test failed." + exit(1) +baseline_file = os.path.join(baselinePath, imgName) +import vtk.test.Testing +vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir() +vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25) +vtk.test.Testing.interact() + -- 2.39.2