class PVGeoPercentThreshold(PercentThreshold): def __init__(self): PercentThreshold.__init__(self) #### Seters and Geters #### @smproperty.doublevector(name="Percent", default_values=50.0) @smdomain.doublerange(min=0.0, max=100.0) def SetPercent(self, percent): PercentThreshold.SetPercent(self, percent) @smproperty.xml( _helpers.getPropertyXml(name='Use Continuous Cell Range', command='SetUseContinuousCellRange', default_values=False)) def SetUseContinuousCellRange(self, flag): PercentThreshold.SetUseContinuousCellRange(self, flag) @smproperty.xml( _helpers.getPropertyXml(name='Invert', command='SetInvert', default_values=False, help='Use to invert the threshold filter.')) def SetInvert(self, flag): PercentThreshold.SetInvert(self, flag) @smproperty.xml(_helpers.getInputArrayXml(nInputPorts=1, numArrays=1)) def SetInputArrayToProcess(self, idx, port, connection, field, name): return PercentThreshold.SetInputArrayToProcess(self, idx, port, connection, field, name)
class PVGeoReverseImageDataAxii(ReverseImageDataAxii): def __init__(self): ReverseImageDataAxii.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getPropertyXml( name='Flip X Axis', command='SetFlipX', default_values=True, help='A boolean to set whether to flip the X axis.')) def SetFlipX(self, flag): ReverseImageDataAxii.SetFlipX(self, flag) @smproperty.xml( _helpers.getPropertyXml( name='Flip Y Axis', command='SetFlipY', default_values=True, help='A boolean to set whether to flip the Y axis.')) def SetFlipY(self, flag): ReverseImageDataAxii.SetFlipY(self, flag) @smproperty.xml( _helpers.getPropertyXml( name='Flip Z Axis', command='SetFlipZ', default_values=True, help='A boolean to set whether to flip the Z axis.')) def SetFlipZ(self, flag): ReverseImageDataAxii.SetFlipZ(self, flag)
class PVGeoVoxelizePoints(VoxelizePoints): def __init__(self): VoxelizePoints.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getPropertyXml( name='Estimate Grid Spacing', command='SetEstimateGrid', default_values=True, help= 'A boolean to set whether to try to estimate the proper dx, dy, and dz spacings for a grid on a regular cartesian coordinate system.', panel_visibility='advanced')) def SetEstimateGrid(self, flag): VoxelizePoints.SetEstimateGrid(self, flag) @smproperty.xml( _helpers.getPropertyXml( name='Cell Size', command='SetCellSize', default_values=[10.0, 10.0, 10.0], help= 'The cell size (dx, dy, dz) to use as a default for all generated voxels.', panel_visibility='advanced')) def SetCellSize(self, dx, dy, dz): VoxelizePoints.SetDeltas(self, dx, dy, dz)
class PVGeoAddCellConnToPoints(AddCellConnToPoints): def __init__(self): AddCellConnToPoints.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getDropDownXml(name='CellType', command='SetCellType', labels=['Line', 'Poly Line'], values=[3, 4])) def SetCellType(self, cellType): AddCellConnToPoints.SetCellType(self, cellType) @smproperty.xml( _helpers.getPropertyXml( name='Use Neareast Nbr Approx', command='SetUseNearestNbr', default_values=False, help= 'A boolean to control whether or not to use SciPy nearest neighbor approximation when build cell connectivity.' )) def SetUseNearestNbr(self, flag): AddCellConnToPoints.SetUseNearestNbr(self, flag) @smproperty.xml( _helpers.getPropertyXml( name='Use Unique Points', command='SetUseUniquePoints', default_values=False, help='Set a flag on whether to only use unique points')) def SetUseUniquePoints(self, flag): AddCellConnToPoints.SetUseUniquePoints(self, flag)
class PVGeoDelimitedTextReader(DelimitedTextReader): def __init__(self): DelimitedTextReader.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getFileReaderXml( DelimitedTextReader.extensions, readerDescription=DelimitedTextReader.description)) def AddFileName(self, fname): DelimitedTextReader.AddFileName(self, fname) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): DelimitedTextReader.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return DelimitedTextReader.GetTimestepValues(self) @smproperty.stringvector(name="Delimiter", default_values=" ") def SetDelimiter(self, deli): DelimitedTextReader.SetDelimiter(self, deli) @smproperty.xml( _helpers.getPropertyXml( name='Use Split on Whitespace', command='SetSplitOnWhiteSpace', default_values=False, help= 'A boolean to override the Delimiter_Field and use whitespace as delimiter.' )) def SetSplitOnWhiteSpace(self, flag): DelimitedTextReader.SetSplitOnWhiteSpace(self, flag) @smproperty.intvector(name="SkipRows", default_values=0) def SetSkipRows(self, skip): DelimitedTextReader.SetSkipRows(self, skip) @smproperty.stringvector(name="Comments", default_values="!") def SetComments(self, identifier): DelimitedTextReader.SetComments(self, identifier) @smproperty.xml( _helpers.getPropertyXml( name='Has Titles', command='SetHasTitles', default_values=True, help= 'A boolean for if the delimited file has header titles for the data arrays.' )) def SetHasTitles(self, flag): DelimitedTextReader.SetHasTitles(self, flag)
class PVGeoPointsToTube(PointsToTube): def __init__(self): PointsToTube.__init__(self) #### Seters and Geters #### # NOTE: Not givign the use the choice of cell type for this... # It is still accesible to change though... @smproperty.doublevector(name="Radius", default_values=10.0) def SetRadius(self, radius): PointsToTube.SetRadius(self, radius) @smproperty.intvector(name="Number of Sides", default_values=20) def SetNumberOfSides(self, num): PointsToTube.SetNumberOfSides(self, num) @smproperty.xml( _helpers.getPropertyXml( name='Use Nearest Neighbor', command='SetUseNearestNbr', default_values=False, help= 'A boolean to set whether to use a nearest neighbor approxiamtion when building path from input points.' )) def SetUseNearestNbr(self, flag): PointsToTube.SetUseNearestNbr(self, flag) @smproperty.xml( _helpers.getPropertyXml( name='Capping', command='SetCapping', default_values=False, help='A boolean to set whether to cap the ends of the tube.')) def SetCapping(self, flag): PointsToTube.SetCapping(self, flag) @smproperty.xml( _helpers.getDropDownXml(name='CellType', command='SetCellType', labels=['Line', 'Poly Line'], values=[3, 4])) def SetCellType(self, cellType): PointsToTube.SetCellType(self, cellType) @smproperty.xml( _helpers.getPropertyXml( name='Use Unique Points', command='SetUseUniquePoints', default_values=False, help='Set a flag on whether to only use unique points')) def SetUseUniquePoints(self, flag): PointsToTube.SetUseUniquePoints(self, flag)
class PVGeoArraysToRGBA(ArraysToRGBA): def __init__(self): ArraysToRGBA.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getInputArrayXml( nInputPorts=1, numArrays=4, labels=['Red', 'Green', 'Blue', 'Transparency'])) def SetInputArrayToProcess(self, idx, port, connection, field, name): return ArraysToRGBA.SetInputArrayToProcess(self, idx, port, connection, field, name) @smproperty.xml( _helpers.getPropertyXml( name='Use Transparency', command='SetUseTransparency', default_values=False, help= 'A boolean to control whether or not to use the Transparency array.' )) def SetUseTransparency(self, flag): ArraysToRGBA.SetUseTransparency(self, flag) @smproperty.doublevector(name="Mask", default_values=-9999.0) def SetMaskValue(self, val): ArraysToRGBA.SetMaskValue(self, val)
class PVGeoExtractTopography(ExtractTopography): def __init__(self): ExtractTopography.__init__(self) #### Seters and Geters #### @smproperty.doublevector(name="Tolerance", default_values=1.0) def SetTolerance(self, tol): ExtractTopography.SetTolerance(self, tol) @smproperty.doublevector(name="Offset", default_values=0.0) def SetOffset(self, offset): ExtractTopography.SetOffset(self, offset) @smproperty.xml( _helpers.getDropDownXml( name='Operation', command='SetOperation', labels=ExtractTopography.GetOperationNames(), help='This is the type of extraction operation to apply')) def SetOperation(self, op): ExtractTopography.SetOperation(self, op) @smproperty.xml( _helpers.getPropertyXml( name='Invert', command='SetInvert', default_values=False, help='A boolean to set whether on whether to invert the extraction.' )) def SetInvert(self, flag): ExtractTopography.SetInvert(self, flag)
class PVGeoTensorMeshAppender(TensorMeshAppender): """This assumes the input vtkRectilinearGrid has already handled the timesteps""" def __init__(self): TensorMeshAppender.__init__(self) @smproperty.xml(''' <StringVectorProperty panel_visibility="default" name="ModelFiles" label="File Name(s) Model" command="AddModelFileName" animateable="1" repeat_command="1" clean_command="ClearModels" number_of_elements="1"> <FileListDomain name="modelfiles"/> <Documentation>This is for a single sets of model files to append to the mesh as data time varying attributes. You can chose as many files as you would like for this for the given attribute.</Documentation> </StringVectorProperty>''') def AddModelFileName(self, fname): """Use to set the file names for the reader. Handles single string or list of strings.""" TensorMeshAppender.AddModelFileName(self, fname) @smproperty.xml(_helpers.getPropertyXml(name='Use extension name', command='SetUseExtensionAsName', default_values=True, help='A boolean to override the DataName and use whitespace model file extension as data name.', panel_visibility="advanced")) def SetUseExtensionAsName(self, flag): TensorMeshAppender.SetUseExtensionAsName(self, flag) @smproperty.stringvector(name='DataName', default_values='Appended Data', panel_visibility="advanced") def SetDataName(self, name): TensorMeshAppender.SetDataName(self, name) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return TensorMeshAppender.GetTimestepValues(self)
class PVGeoLandsatReader(LandsatReader): def __init__(self): LandsatReader.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getFileReaderXml(LandsatReader.extensions, readerDescription=LandsatReader.description)) def AddFileName(self, fname): LandsatReader.AddFileName(self, fname) @smproperty.dataarrayselection(name="Available Bands") def GetDataSelection(self): return LandsatReader.GetDataSelection(self) @smproperty.xml( _helpers.getPropertyXml( name='Cast Data Type', command='CastDataType', default_values=True, help= 'A boolean to set whether to cast the data arrays so invalid points are filled nans.', panel_visibility='advanced')) def CastDataType(self, flag): LandsatReader.CastDataType(self, flag) @smproperty.xml( _helpers.getDropDownXml(name='Color Scheme', command='SetColorScheme', labels=LandsatReader.GetColorSchemeNames(), help='Set a color scheme to use.')) def SetColorScheme(self, scheme): LandsatReader.SetColorScheme(self, scheme)
class PVGeoSGeMSGridReader(SGeMSGridReader): def __init__(self): SGeMSGridReader.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getFileReaderXml("sgems dat geoeas gslib GSLIB txt SGEMS", readerDescription='GSLib Table')) def AddFileName(self, fname): SGeMSGridReader.AddFileName(self, fname) @smproperty.stringvector(name="Delimiter", default_values=" ") def SetDelimiter(self, deli): SGeMSGridReader.SetDelimiter(self, deli) @smproperty.xml( _helpers.getPropertyXml( name='Use Tab Delimiter', command='SetUseTab', default_values=False, help= 'A boolean to override the Delimiter_Field and use a Tab delimiter.' )) def SetUseTab(self, flag): SGeMSGridReader.SetUseTab(self, flag) @smproperty.intvector(name="SkipRows", default_values=0) def SetSkipRows(self, skip): SGeMSGridReader.SetSkipRows(self, skip) @smproperty.stringvector(name="Comments", default_values="#") def SetComments(self, identifier): SGeMSGridReader.SetComments(self, identifier) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): SGeMSGridReader.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return SGeMSGridReader.GetTimestepValues(self) @smproperty.doublevector( name="Spacing", default_values=[1.0, 1.0, 1.0], ) def SetSpacing(self, dx, dy, dz): SGeMSGridReader.SetSpacing(self, dx, dy, dz) @smproperty.doublevector( name="Origin", default_values=[0.0, 0.0, 0.0], ) def SetOrigin(self, ox, oy, oz): SGeMSGridReader.SetOrigin(self, ox, oy, oz)
class PVGeoRotatePoints(RotatePoints): def __init__(self): RotatePoints.__init__(self) #### Seters and Geters #### @smproperty.doublevector(name="Rotation Angle", default_values=45.0) @smdomain.doublerange(min=-90.0, max=90.0) def SetRotationDegrees(self, theta): RotatePoints.SetRotationDegrees(self, theta) @smproperty.doublevector(name="Origin", default_values=[0.0, 0.0], panel_visibility='advanced') def SetOrigin(self, xo, yo): RotatePoints.SetOrigin(self, xo, yo) @smproperty.xml( _helpers.getPropertyXml(name='Use Corner', command='SetUseCorner', default_values=True, help='Use the corner as the rotation origin.', panel_visibility='advanced')) def SetUseCorner(self, flag): RotatePoints.SetUseCorner(self, flag)
class PVGeoTableToGrid(TableToGrid): def __init__(self): TableToGrid.__init__(self) #### Setters / Getters #### @smproperty.intvector(name="Extent", default_values=[10, 10, 10]) def SetExtent(self, nx, ny, nz): TableToGrid.SetExtent(self, nx, ny, nz) @smproperty.doublevector(name="Spacing", default_values=[1.0, 1.0, 1.0]) def SetSpacing(self, dx, dy, dz): TableToGrid.SetSpacing(self, dx, dy, dz) @smproperty.doublevector(name="Origin", default_values=[0.0, 0.0, 0.0]) def SetOrigin(self, x0, y0, z0): TableToGrid.SetOrigin(self, x0, y0, z0) @smproperty.xml( _helpers.getPropertyXml( name='SEPlib', command='SetSEPlib', default_values=False, help= 'Use the Stanford Exploration Project\'s axial conventions (d1=z, d2=x, d3=y). Parameters would be entered [z,x,y].' )) def SetSEPlib(self, flag): TableToGrid.SetSEPlib(self, flag) @smproperty.xml( _helpers.getDropDownXml(name='Order', command='SetOrder', labels=[ 'Fortran-style: column-major order', 'C-style: Row-major order' ], values=[0, 1])) def SetOrder(self, order): o = ['F', 'C'] TableToGrid.SetOrder(self, o[order]) @smproperty.xml( _helpers.getPropertyXml(name='Swap XY', command='SetSwapXY', default_values=False)) def SetSwapXY(self, flag): TableToGrid.SetSwapXY(self, flag)
class PVGeoTableToTimeGrid(TableToTimeGrid): def __init__(self): TableToTimeGrid.__init__(self) #### Setters / Getters #### @smproperty.intvector(name="Extent", default_values=[10, 10, 10, 1]) def SetExtent(self, nx, ny, nz, nt): TableToTimeGrid.SetExtent(self, nx, ny, nz, nt) @smproperty.intvector(name="Dimensions", default_values=[0, 1, 2, 3]) def SetDimensions(self, x, y, z, t): TableToTimeGrid.SetDimensions(self, x, y, z, t) @smproperty.doublevector(name="Spacing", default_values=[1.0, 1.0, 1.0]) def SetSpacing(self, dx, dy, dz): TableToTimeGrid.SetSpacing(self, dx, dy, dz) @smproperty.doublevector(name="Origin", default_values=[0.0, 0.0, 0.0]) def SetOrigin(self, x0, y0, z0): TableToTimeGrid.SetOrigin(self, x0, y0, z0) @smproperty.xml( _helpers.getDropDownXml(name='Order', command='SetOrder', labels=[ 'C-style: Row-major order', 'Fortran-style: column-major order' ], values=[0, 1])) def SetOrder(self, order): o = ['C', 'F'] TableToTimeGrid.SetOrder(self, o[order]) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): TableToTimeGrid.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return TableToTimeGrid.GetTimestepValues(self) @smproperty.xml( _helpers.getPropertyXml( name='Use Point Data', command='SetUsePoints', default_values=False, panel_visibility='advanced', help= 'Set whether or not to place the data on the nodes/cells of the grid. In ParaView, switching can be a bit buggy: be sure to turn the visibility of this data object OFF on the pipeline when changing bewteen nodes/cells.' )) def SetUsePoints(self, flag): TableToTimeGrid.SetUsePoints(self, flag)
class PVGeoUBCOcTreeMeshReader(OcTreeReader): def __init__(self): OcTreeReader.__init__(self) #### Seters and Geters #### @smproperty.xml(''' <StringVectorProperty panel_visibility="advanced" name="MeshFile" label="File Name Mesh" command="SetMeshFileName" animateable="1" clean_command="ClearMesh" number_of_elements="1"> <FileListDomain name="meshfile"/> <Documentation>This is the mesh file for a OcTree Mesh grid. This plugin only allows ONE mesh to be defined.</Documentation> </StringVectorProperty>''') def SetMeshFileName(self, fname): OcTreeReader.SetMeshFileName(self, fname) @smproperty.xml(''' <StringVectorProperty panel_visibility="default" name="ModelFiles" label="File Name(s) Model" command="AddModelFileName" animateable="1" repeat_command="1" clean_command="ClearModels" number_of_elements="1"> <FileListDomain name="modelfiles"/> <Documentation>This is for a single sets of model files to append to the mesh as data time varying attributes. You can chose as many files as you would like for this for the given attribute.</Documentation> </StringVectorProperty>''') def AddModelFileName(self, fname): """Use to set the file names for the reader. Handles singlt string or list of strings.""" OcTreeReader.AddModelFileName(self, fname) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): OcTreeReader.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return OcTreeReader.GetTimestepValues(self) @smproperty.xml(_helpers.getPropertyXml(name='Use extension name', command='SetUseExtensionAsName', default_values=True, help='A boolean to override the DataName and use whitespace model file extension as data name.', panel_visibility="advanced")) def SetUseExtensionAsName(self, flag): OcTreeReader.SetUseExtensionAsName(self, flag) @smproperty.stringvector(name='DataName', default_values='Data', panel_visibility="advanced") def SetDataName(self, name): OcTreeReader.SetDataName(self, name)
class PVGeoGSLibReader(GSLibReader): def __init__(self): GSLibReader.__init__(self) #### Seters and Geters #### # @smproperty.stringvector(name="FileNames", panel_visibility="advanced") # @smdomain.filelist() # @smhint.filechooser(extensions="sgems dat geoeas gslib GSLIB txt SGEMS", file_description="GSLib Tables") @smproperty.xml( _helpers.getFileReaderXml("sgems dat geoeas gslib GSLIB txt SGEMS", readerDescription='GSLib Table')) def AddFileName(self, fname): GSLibReader.AddFileName(self, fname) @smproperty.stringvector(name="Delimiter", default_values=" ") def SetDelimiter(self, deli): GSLibReader.SetDelimiter(self, deli) @smproperty.xml( _helpers.getPropertyXml( name='Use Tab Delimiter', command='SetUseTab', default_values=False, help= 'A boolean to override the Delimiter_Field and use a Tab delimiter.' )) def SetUseTab(self, flag): GSLibReader.SetUseTab(self, flag) @smproperty.intvector(name="SkipRows", default_values=0) def SetSkipRows(self, skip): GSLibReader.SetSkipRows(self, skip) @smproperty.stringvector(name="Comments", default_values="#") def SetComments(self, identifier): GSLibReader.SetComments(self, identifier) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): GSLibReader.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return GSLibReader.GetTimestepValues(self) @smproperty.xml( """<Property name="Print File Header" command="PrintFileHeader" panel_widget="command_button"/>""" ) def PrintFileHeader(self): print(GSLibReader.GetFileHeader(self)) return 1
class PVGeoGSLibReader(GSLibReader): def __init__(self): GSLibReader.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getFileReaderXml(GSLibReader.extensions, readerDescription=GSLibReader.description)) def AddFileName(self, fname): GSLibReader.AddFileName(self, fname) @smproperty.stringvector(name="Delimiter", default_values=" ") def SetDelimiter(self, deli): GSLibReader.SetDelimiter(self, deli) @smproperty.xml( _helpers.getPropertyXml( name='Use Split on Whitespace', command='SetSplitOnWhiteSpace', default_values=False, help= 'A boolean to override the Delimiter_Field and use whitespace as delimiter.' )) def SetSplitOnWhiteSpace(self, flag): GSLibReader.SetSplitOnWhiteSpace(self, flag) @smproperty.intvector(name="SkipRows", default_values=0) def SetSkipRows(self, skip): GSLibReader.SetSkipRows(self, skip) @smproperty.stringvector(name="Comments", default_values="!") def SetComments(self, identifier): GSLibReader.SetComments(self, identifier) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): GSLibReader.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return GSLibReader.GetTimestepValues(self) @smproperty.xml( """<Property name="Print File Header" command="PrintFileHeader" panel_widget="command_button"/>""" ) def PrintFileHeader(self): print(GSLibReader.GetFileHeader(self)) return 1
class PVGeoXYZTextReader(XYZTextReader): def __init__(self): XYZTextReader.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.getFileReaderXml(XYZ_EXTS, readerDescription=XYZ_DESC)) def AddFileName(self, fname): XYZTextReader.AddFileName(self, fname) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def SetTimeDelta(self, dt): XYZTextReader.SetTimeDelta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def GetTimestepValues(self): """This is critical for registering the timesteps""" return XYZTextReader.GetTimestepValues(self) @smproperty.stringvector(name="Delimiter", default_values=" ") def SetDelimiter(self, deli): XYZTextReader.SetDelimiter(self, deli) @smproperty.xml( _helpers.getPropertyXml( name='Use Tab Delimiter', command='SetUseTab', default_values=False, help= 'A boolean to override the Delimiter_Field and use a Tab delimiter.' )) def SetUseTab(self, flag): XYZTextReader.SetUseTab(self, flag) @smproperty.intvector(name="SkipRows", default_values=0) def SetSkipRows(self, skip): XYZTextReader.SetSkipRows(self, skip) @smproperty.stringvector(name="Comments", default_values="#") def SetComments(self, identifier): XYZTextReader.SetComments(self, identifier)
class PVGeoNormalizeArray(NormalizeArray): def __init__(self): NormalizeArray.__init__(self) #### SETTERS AND GETTERS #### @smproperty.xml(_helpers.getInputArrayXml(nInputPorts=1, numArrays=1)) def SetInputArrayToProcess(self, idx, port, connection, field, name): return NormalizeArray.SetInputArrayToProcess(self, idx, port, connection, field, name) @smproperty.doublevector(name="Multiplier", default_values=1.0) def SetMultiplier(self, val): NormalizeArray.SetMultiplier(self, val) @smproperty.stringvector(name="New Array Name", default_values="Normalized") def SetNewArrayName(self, name): NormalizeArray.SetNewArrayName(self, name) @smproperty.xml( _helpers.getDropDownXml( name='Normalization', command='SetNormalization', labels=NormalizeArray.GetNormalizationNames(), help= 'This is the type of normalization to apply to the input array.')) def SetNormalization(self, norm): NormalizeArray.SetNormalization(self, norm) @smproperty.xml( _helpers.getPropertyXml( name='Absolute Value', command='SetTakeAbsoluteValue', default_values=False, help= 'This will take the absolute value of the array before normalization.' )) def SetTakeAbsoluteValue(self, flag): NormalizeArray.SetTakeAbsoluteValue(self, flag) @smproperty.doublevector(name="Shifter", default_values=0.0) def SetShift(self, sft): NormalizeArray.SetShift(self, sft)
class PVGeoManySlicesAlongPoints(ManySlicesAlongPoints): def __init__(self): ManySlicesAlongPoints.__init__(self) @smproperty.intvector(name="Number of Slices", default_values=10) @smdomain.intrange(min=2, max=25) def SetNumberOfSlices(self, num): ManySlicesAlongPoints.SetNumberOfSlices(self, num) @smproperty.xml( _helpers.getPropertyXml( name='Use Neareast Nbr Approx', command='SetUseNearestNbr', default_values=False, help= 'A boolean to control whether or not to use SciPy nearest neighbor approximation when build cell connectivity.' )) def SetUseNearestNbr(self, flag): ManySlicesAlongPoints.SetUseNearestNbr(self, flag)
class PVGeoSlideSliceAlongPoints(SlideSliceAlongPoints): def __init__(self): SlideSliceAlongPoints.__init__(self) @smproperty.intvector(name="Location", default_values=50) @smdomain.intrange(min=0, max=99) def SetLocation(self, loc): SlideSliceAlongPoints.SetLocation(self, loc) @smproperty.xml( _helpers.getPropertyXml( name='Use Neareast Nbr Approx', command='SetUseNearestNbr', default_values=False, help= 'A boolean to control whether or not to use SciPy nearest neighbor approximation when build cell connectivity.' )) def SetUseNearestNbr(self, flag): SlideSliceAlongPoints.SetUseNearestNbr(self, flag)
class PVGeoOcTreeAppender(OcTreeAppender): """This assumes the input vtkUnstructuredGrid has already handled the timesteps""" def __init__(self): OcTreeAppender.__init__(self) @smproperty.xml(''' <StringVectorProperty panel_visibility="default" name="ModelFiles" label="File Name(s) Model" command="AddModelFileName" animateable="1" repeat_command="1" clean_command="ClearModels" number_of_elements="1"> <FileListDomain name="modelfiles"/> <Documentation>This is for a single sets of model files to append to the mesh as data time varying attributes. You can chose as many files as you would like for this for the given attribute.</Documentation> </StringVectorProperty>''') def AddModelFileName(self, fname): """Use to set the file names for the reader. Handles single string or list of strings.""" OcTreeAppender.AddModelFileName(self, fname) @smproperty.xml( _helpers.getPropertyXml( name='Use file as data name', command='SetUseFileName', default_values=True, help= 'A boolean to override the DataName and use model file name as data name.', panel_visibility="advanced")) def SetUseFileName(self, flag): OcTreeAppender.SetUseFileName(self, flag) @smproperty.stringvector(name='DataName', default_values='Appended Data', panel_visibility="advanced") def SetDataName(self, name): OcTreeAppender.SetDataName(self, name)