class PVGeoMadagascarReader(MadagascarReader): def __init__(self): MadagascarReader.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.get_file_reader_xml( MadagascarReader.extensions, reader_description=MadagascarReader.description ) ) def AddFileName(self, filename): MadagascarReader.AddFileName(self, filename) @smproperty.doublevector( name="TimeDelta", default_values=1.0, panel_visibility="advanced" ) def set_time_delta(self, dt): MadagascarReader.set_time_delta(self, dt) @smproperty.doublevector( name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty" ) def get_time_step_values(self): """This is critical for registering the timesteps""" return MadagascarReader.get_time_step_values(self) @smproperty.xml( _helpers.get_drop_down_xml( 'Endian', 'set_endian', ['Native', 'Little-Endian', 'Big-Endian'], help='This is the type memory endianness.', ) ) def set_endian(self, endian): MadagascarReader.set_endian(self, endian) @smproperty.xml( _helpers.get_drop_down_xml( 'DataType', 'set_data_type', ['Float64', 'Float32', 'Integer4'], help='This is data type to read.', ) ) def set_data_type(self, dtype): MadagascarReader.set_data_type(self, dtype) @smproperty.stringvector(name='DataName', default_values='Data') def set_data_name(self, data_name): MadagascarReader.set_data_name(self, data_name)
class PVGeoAddCellConnToPoints(AddCellConnToPoints): def __init__(self): AddCellConnToPoints.__init__(self) #### Seters and Geters #### @smproperty.xml( _helpers.get_drop_down_xml(name='CellType', command='set_cell_type', labels=['Line', 'Poly Line'], values=[3, 4])) def set_cell_type(self, cell_type): AddCellConnToPoints.set_cell_type(self, cell_type) @smproperty.xml( _helpers.get_property_xml( name='Use Neareast Nbr Approx', command='set_use_nearest_nbr', default_values=False, help= 'A boolean to control whether or not to use SciPy nearest neighbor approximation when build cell connectivity.' )) def set_use_nearest_nbr(self, flag): AddCellConnToPoints.set_use_nearest_nbr(self, flag) @smproperty.xml( _helpers.get_property_xml( name='Use Unique Points', command='set_use_unique_points', default_values=False, help='Set a flag on whether to only use unique points')) def set_use_unique_points(self, flag): AddCellConnToPoints.set_use_unique_points(self, flag)
class PVGeoExtractTopography(ExtractTopography): def __init__(self): ExtractTopography.__init__(self) #### Seters and Geters #### @smproperty.doublevector(name="Tolerance", default_values=1.0) def set_tolerance(self, tol): ExtractTopography.set_tolerance(self, tol) @smproperty.doublevector(name="Offset", default_values=0.0) def set_offset(self, offset): ExtractTopography.set_offset(self, offset) @smproperty.xml( _helpers.get_drop_down_xml( name='Operation', command='set_operation', labels=ExtractTopography.get_operation_names(), help='This is the type of extraction operation to apply', )) def set_operation(self, op): ExtractTopography.set_operation(self, op) @smproperty.xml( _helpers.get_property_xml( name='Invert', command='set_invert', default_values=False, help= 'A boolean to set whether on whether to invert the extraction.', )) def set_invert(self, flag): ExtractTopography.set_invert(self, flag)
class PVGeoSliceThroughTime(SliceThroughTime): def __init__(self): SliceThroughTime.__init__(self) @smproperty.intvector(name="Number of Slices", default_values=10) @smdomain.intrange(min=2, max=50) def set_number_of_slices(self, num): SliceThroughTime.set_number_of_slices(self, num) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def set_time_delta(self, dt): SliceThroughTime.set_time_delta(self, dt) @smproperty.xml( _helpers.get_drop_down_xml(name='Axis', command='set_axis', labels=['X Axis', 'Y Axis', 'Z Axis'], values=[0, 1, 2])) def set_axis(self, axis): SliceThroughTime.set_axis(self, axis) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def get_time_step_values(self): """This is critical for registering the timesteps""" return SliceThroughTime.get_time_step_values(self)
class PVGeoArrayMath(ArrayMath): def __init__(self): ArrayMath.__init__(self) #### SETTERS AND GETTERS #### @smproperty.xml(_helpers.get_input_array_xml(nInputPorts=1, n_arrays=2)) def SetInputArrayToProcess(self, idx, port, connection, field, name): return ArrayMath.SetInputArrayToProcess(self, idx, port, connection, field, name) @smproperty.doublevector(name="Multiplier", default_values=1.0) def set_multiplier(self, val): ArrayMath.set_multiplier(self, val) @smproperty.stringvector(name="New Array Name", default_values="Mathed Up") def set_new_array_name(self, name): ArrayMath.set_new_array_name(self, name) @smproperty.xml( _helpers.get_drop_down_xml( name='Operation', command='set_operation', labels=ArrayMath.get_operation_names(), help='This is the type of operation to apply to the input arrays.') ) def set_operation(self, op): ArrayMath.set_operation(self, op)
class PVGeoReshapeTable(ReshapeTable): def __init__(self): ReshapeTable.__init__(self) #### Seters and Geters #### @smproperty.stringvector(name="Names", default_values='Field 0') def set_names(self, names): """Set names using a semicolon (;) seperated list""" # parse the names (a semicolon seperated list of names) ReshapeTable.set_names(self, names) @smproperty.intvector(name="Number of Columns", default_values=6) def set_number_of_columns(self, ncols): ReshapeTable.set_number_of_columns(self, ncols) @smproperty.intvector(name="Number of Rows", default_values=126) def set_number_of_rows(self, nrows): ReshapeTable.set_number_of_rows(self, nrows) @smproperty.xml( _helpers.get_drop_down_xml(name='Order', command='set_order', labels=[ 'Fortran-style: column-major order', 'C-style: Row-major order' ], values=[0, 1])) def set_order(self, order): o = ['F', 'C'] ReshapeTable.set_order(self, o[order])
class PVGeoLandsatReader(LandsatReader): def __init__(self): LandsatReader.__init__(self) #### Seters and Geters #### @smproperty.xml(_helpers.get_file_reader_xml(LandsatReader.extensions, reader_description=LandsatReader.description)) def AddFileName(self, filename): LandsatReader.AddFileName(self, filename) @smproperty.dataarrayselection(name="Available Bands") def GetDataSelection(self): return LandsatReader.GetDataSelection(self) @smproperty.xml(_helpers.get_property_xml(name='Cast Data Type', command='set_cast_data_type', default_values=True, help='A boolean to set whether to cast the data arrays so invalid points are filled nans.', panel_visibility='advanced')) def set_cast_data_type(self, flag): LandsatReader.set_cast_data_type(self, flag) @smproperty.xml(_helpers.get_drop_down_xml(name='Color Scheme', command='set_color_scheme', labels=LandsatReader.GetColorSchemeNames(), help='Set a color scheme to use.')) def set_color_scheme(self, scheme): LandsatReader.set_color_scheme(self, scheme)
class PVGeoTableToTimeGrid(TableToTimeGrid): def __init__(self): TableToTimeGrid.__init__(self) #### Setters / Getters #### @smproperty.intvector(name="Extent", default_values=[10, 10, 10, 1]) def set_extent(self, nx, ny, nz, nt): TableToTimeGrid.set_extent(self, nx, ny, nz, nt) @smproperty.intvector(name="Dimensions", default_values=[0, 1, 2, 3]) def set_dimensions(self, x, y, z, t): TableToTimeGrid.set_dimensions(self, x, y, z, t) @smproperty.doublevector(name="Spacing", default_values=[1.0, 1.0, 1.0]) def set_spacing(self, dx, dy, dz): TableToTimeGrid.set_spacing(self, dx, dy, dz) @smproperty.doublevector(name="Origin", default_values=[0.0, 0.0, 0.0]) def set_origin(self, x0, y0, z0): TableToTimeGrid.set_origin(self, x0, y0, z0) @smproperty.xml( _helpers.get_drop_down_xml( name='Order', command='set_order', labels=[ 'C-style: Row-major order', 'Fortran-style: column-major order' ], values=[0, 1], )) def set_order(self, order): o = ['C', 'F'] TableToTimeGrid.set_order(self, o[order]) @smproperty.doublevector(name="TimeDelta", default_values=1.0, panel_visibility="advanced") def set_time_delta(self, dt): TableToTimeGrid.set_time_delta(self, dt) @smproperty.doublevector(name="TimestepValues", information_only="1", si_class="vtkSITimeStepsProperty") def get_time_step_values(self): """This is critical for registering the timesteps""" return TableToTimeGrid.get_time_step_values(self) @smproperty.xml( _helpers.get_property_xml( name='Use Point Data', command='set_use_points', 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 set_use_points(self, flag): TableToTimeGrid.set_use_points(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 set_radius(self, radius): PointsToTube.set_radius(self, radius) @smproperty.intvector(name="Number of Sides", default_values=20) def set_number_of_sides(self, num): PointsToTube.set_number_of_sides(self, num) @smproperty.xml( _helpers.get_property_xml( name='Use Nearest Neighbor', command='set_use_nearest_nbr', default_values=False, help= 'A boolean to set whether to use a nearest neighbor approxiamtion when building path from input points.', )) def set_use_nearest_nbr(self, flag): PointsToTube.set_use_nearest_nbr(self, flag) @smproperty.xml( _helpers.get_property_xml( name='Capping', command='set_capping', default_values=False, help='A boolean to set whether to cap the ends of the tube.', )) def set_capping(self, flag): PointsToTube.set_capping(self, flag) @smproperty.xml( _helpers.get_drop_down_xml( name='CellType', command='set_cell_type', labels=['Line', 'Poly Line'], values=[3, 4], )) def set_cell_type(self, cell_type): PointsToTube.set_cell_type(self, cell_type) @smproperty.xml( _helpers.get_property_xml( name='Use Unique Points', command='set_use_unique_points', default_values=False, help='Set a flag on whether to only use unique points', )) def set_use_unique_points(self, flag): PointsToTube.set_use_unique_points(self, flag)
class PVGeoTranslateGridOrigin(TranslateGridOrigin): def __init__(self): TranslateGridOrigin.__init__(self) #### Seters and Geters #### @smproperty.xml(_helpers.get_drop_down_xml(name='Corner', command='set_corner', labels=['South East Bottom', 'North West Bottom', 'North East Bottom', 'South West Top', 'South East Top', 'North West Top', 'North East Top'], values=[1,2,3,4,5,6,7])) def set_corner(self, corner): TranslateGridOrigin.set_corner(self, corner)
class PVGeoConvertUnits(ConvertUnits): def __init__(self): ConvertUnits.__init__(self) #### SETTERS AND GETTERS #### @smproperty.xml( _helpers.get_drop_down_xml( name='Conversion', command='set_conversion', labels=ConvertUnits.lookup_conversions(True), help='This will set the spatial conversion.')) def set_conversion(self, key): ConvertUnits.set_conversion(self, key)
class PVGeoManySlicesAlongAxis(ManySlicesAlongAxis): def __init__(self): ManySlicesAlongAxis.__init__(self) @smproperty.intvector(name="Number of Slices", default_values=5) @smdomain.intrange(min=2, max=25) def set_number_of_slices(self, num): ManySlicesAlongAxis.set_number_of_slices(self, num) @smproperty.xml( _helpers.get_drop_down_xml(name='Axis', command='set_axis', labels=['X Axis', 'Y Axis', 'Z Axis'], values=[0, 1, 2])) def set_axis(self, axis): ManySlicesAlongAxis.set_axis(self, axis)
class PVGeoLonLatToUTM(LonLatToUTM): def __init__(self): LonLatToUTM.__init__(self) @smproperty.intvector(name="Zone", default_values=11) @smdomain.intrange(min=1, max=60) def set_zone(self, zone): LonLatToUTM.set_zone(self, zone) @smproperty.xml( _helpers.get_drop_down_xml( name='Ellps', command='set_ellps', labels=LonLatToUTM.get_available_ellps(), help='This will set the ellps.')) def set_ellps(self, ellps): LonLatToUTM.set_ellps(self, ellps)
class PVGeoNormalizeArray(NormalizeArray): def __init__(self): NormalizeArray.__init__(self) #### SETTERS AND GETTERS #### @smproperty.xml(_helpers.get_input_array_xml(nInputPorts=1, n_arrays=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 set_multiplier(self, val): NormalizeArray.set_multiplier(self, val) @smproperty.stringvector(name="New Array Name", default_values="Normalized") def set_new_array_name(self, name): NormalizeArray.set_new_array_name(self, name) @smproperty.xml( _helpers.get_drop_down_xml( name='Normalization', command='set_normalization', labels=NormalizeArray.get_normalization_names(), help= 'This is the type of normalization to apply to the input array.', )) def set_normalization(self, norm): NormalizeArray.set_normalization(self, norm) @smproperty.xml( _helpers.get_property_xml( name='Absolute Value', command='set_take_absolute_value', default_values=False, help= 'This will take the absolute value of the array before normalization.', )) def set_take_absolute_value(self, flag): NormalizeArray.set_take_absolute_value(self, flag) @smproperty.doublevector(name="Shifter", default_values=0.0) def set_shift(self, sft): NormalizeArray.set_shift(self, sft)