ImageSubdomainGenerator

The ImageSubdomainGenerator uses the coordinates of each element's centroid to sample a location of an image. It then uses the resulting color value of the pixel to determine the subdomain ID.

Samples an image at the coordinates of each element centroid using the resulting value as each element's subdomain ID

Input Parameters

  • inputThe mesh we want to modify

    C++ Type:MeshGeneratorName

    Options:

    Description:The mesh we want to modify

Required Parameters

  • originOrigin of the image (defaults to mesh origin)

    C++ Type:libMesh::Point

    Options:

    Description:Origin of the image (defaults to mesh origin)

  • file_suffixSuffix of the file to open, e.g. 'png'

    C++ Type:std::string

    Options:

    Description:Suffix of the file to open, e.g. 'png'

  • dimensionsx,y,z dimensions of the image (defaults to mesh dimensions)

    C++ Type:libMesh::Point

    Options:

    Description:x,y,z dimensions of the image (defaults to mesh dimensions)

  • file_baseImage file base to open, use this option when a stack of images must be read (ignored if 'file' is given)

    C++ Type:FileNameNoExtension

    Options:

    Description:Image file base to open, use this option when a stack of images must be read (ignored if 'file' is given)

  • componentThe image RGB-component to return, leaving this blank will result in a greyscale value for the image to be created. The component number is zero based, i.e. 0 returns the first (RED) component of the image.

    C++ Type:unsigned int

    Options:

    Description:The image RGB-component to return, leaving this blank will result in a greyscale value for the image to be created. The component number is zero based, i.e. 0 returns the first (RED) component of the image.

  • fileName of single image file to extract mesh parameters from. If provided, a 2D mesh is created.

    C++ Type:FileName

    Options:

    Description:Name of single image file to extract mesh parameters from. If provided, a 2D mesh is created.

  • file_rangeRange of images to analyze, used with 'file_base' (ignored if 'file' is given)

    C++ Type:std::vector

    Options:

    Description:Range of images to analyze, used with 'file_base' (ignored if 'file' is given)

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector

    Options:

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

  • shift0Value to add to all pixels; occurs prior to scaling

    Default:0

    C++ Type:double

    Options:

    Description:Value to add to all pixels; occurs prior to scaling

  • scale1Multiplier to apply to all pixel values; occurs after shifting

    Default:1

    C++ Type:double

    Options:

    Description:Multiplier to apply to all pixel values; occurs after shifting

Rescale Parameters

  • thresholdThe threshold value

    C++ Type:double

    Options:

    Description:The threshold value

  • upper_value1The value to set for data greater than the threshold value

    Default:1

    C++ Type:double

    Options:

    Description:The value to set for data greater than the threshold value

  • lower_value0The value to set for data less than the threshold value

    Default:0

    C++ Type:double

    Options:

    Description:The value to set for data less than the threshold value

Threshold Parameters

  • flip_zFalseFlip the image along the z-axis

    Default:False

    C++ Type:bool

    Options:

    Description:Flip the image along the z-axis

  • flip_xFalseFlip the image along the x-axis

    Default:False

    C++ Type:bool

    Options:

    Description:Flip the image along the x-axis

  • flip_yFalseFlip the image along the y-axis

    Default:False

    C++ Type:bool

    Options:

    Description:Flip the image along the y-axis

Flip Parameters

Input Files