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

This module reduces the dimension of a topologically regular field by 1 dimension. More...

Inheritance diagram for GetSliceFromStructuredFieldByIndices:

Public Member Functions

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

Detailed Description

This module reduces the dimension of a topologically regular field by 1 dimension.

Constructor & Destructor Documentation

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

Member Function Documentation

void execute ( )
virtual

Get the input field handle from the port.

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

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.

Dims has callback on it, so it must be set it after i, j, and k.

An input matrix is present so use the values in it to override the variables set in the gui. Column 0 selected axis to slice. Column 1 index of the axis to slice. Column 2 dimensions of the data.

Check to see what index has been selected.

The matrix is optional. If present make sure it is a 3x3 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 axis has been selected. Only one should be selected.

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.

Get the index for the axis selected.

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.

Get the dimensions of the old field.

Get the dimensions of the new field.

3D LatVol to 2D Image

3D StructHexVol to 2D StructQuadSurf

2D Image to 1D Scanline or 1D Scanline to 0D Scanline (perhaps it should be pointcloud).

2D StructQuadSurf to 1D StructCurve

Get the index for the axis selected.

This makes it is possible to slice from 1D to 0D easily.

This makes it is possible to slice from 1D to 0D easily.

Slicing along the i axis. In order to get the slice in this direction only one location can be obtained at a time. So the iterator must increment to the correct column (i) index, the location samples, and then incremented to the end of the row.

Slicing along the j axis. In order to get the slice in this direction a complete row can be obtained at a time. So the iterator must increment to the correct row (j) index, the location samples, and then incremented to the end of the slice.

Set the iterator to the correct row (j).

Get all of the points and values along this row.

Get the point and value at this location

Move to the end of all the rows.

Slicing along the k axis.

Get all of the points and values along this slice.

Get the point and value at this location

Create the output matrix with the axis selected, index, and dimensions.


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