SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
SubsampleStructuredFieldByIndices Class Reference
Inheritance diagram for SubsampleStructuredFieldByIndices:

Public Member Functions

 SubsampleStructuredFieldByIndices (GuiContext *context)
 
virtual ~SubsampleStructuredFieldByIndices ()
 
virtual void execute ()
 

Constructor & Destructor Documentation

SubsampleStructuredFieldByIndices ( GuiContext *  context)
virtual ~SubsampleStructuredFieldByIndices ( )
inlinevirtual

Member Function Documentation

void execute ( )
virtual

Get the input field handle from the port.

Structured data with irregular points can be wrapped

Check to see if the gui wrap is different than the field.

Check to see if the gui dimensions are different than the field.

Check to see if the gui dimensions are different than the field.

Check to see if the gui dimensions are different than the field.

Check to see if the gui dimensions are different than the field. This is last because the GUI var has a callback on it.

If the gui dimensions are different than the field then update the gui.

Get the optional matrix handle from the port. Note if a matrix is present it is sent down stream. Otherwise it will be created.

An input matrix is present so use the values in it to override the variables set in the gui. Column 0 start index to subsample. Column 1 stop index to subsample. Column 2 stride value to subsample. Column 3 wrap flag. Column 4 dimensions of the data.

The matrix is optional. If present make sure it is a 3x5 matrix. The row indices is the axis index. The column is the data.

Sanity check. Make sure the gui dimensions match the matrix dimensions.

Check to see what index has been selected and if it matches the gui index.

If no data or an input change recreate the field. I.e Only execute when neeed.

This happens when wrapping.

Add one because we want the last node.

Account for the modulo of stride so that the last node will be included even if it "partial" elem when compared to the others.

For structured uniform geometry we need to set the correct location.

Set the orginal transform.

Get the orgin of mesh. */

Set the iterator to the first point.

Get the point.

Put the new field into the correct location.

Index based on the old mesh so that we are assured of getting the last node even if it forms a "partial" elem.

Check for going past the stop.

Check for overlap.

A hack here so that an iterator can be used. Set this iterator to be at the correct kth index.

Check for going past the stop.

Check for overlap.

A hack here so that an iterator can be used. Set this iterator to be at the correct jth index.

Check for going past the stop.

Check for overlap.

A hack here so that an iterator can be used. Set this iterator to be at the correct ith index.

Create the output matrix with the stop, stop, stride, wrap, and dimensions.


The documentation for this class was generated from the following file: