AccumulateCore

Synopsis

Accumulates different areas that have been segmented by region growing. Allows segmented fields to be cropped from a larger data set and then accumulated back into a complete data set.


    module AccumulateCore {
       Mesh_Unif+Node_Data+IPort2 &in_fld;
       AccumulateParams+IPort2    &params;
       int go          => params.go;
       int reset       => params.reset;
       int dims[]      => params.dims[];
       int dims_choice => params.dims_choice;
       int dtype;
       omethod+notify_inst+req update<src_file="rg_accum.c">(
          in_fld+read+notify+req,
          in_fld.nnodes+req,
          dims_choice+read+notify+req,
          go+read+notify+req,
          reset+read+notify+req,
          dtype+read+write,
          out_fld+read+write
       ) = "rg_accum_update";
       omethod+notify_inst+req update_dims<src_file="rg_acc_d.c">(
          in_fld+read+notify+req,
          in_fld.nnodes+req,
          dims+read+notify+req,
          dims_choice+read+notify+req,
          go+read+notify+req,
          reset+read+notify+req,
          dtype+read+write,
          out_fld+read+write
       ) = "rg_accum_update_dims";
       Mesh_Unif+Node_Data+OPort2 out_fld;
    };
};

Description

This module allows several uniform fields to be accumulated into a single output field. If a visualization requires several different regions to be segmented this module can be used to combine the regions into a single output. Controls are provided so that if the input data has been cropped it can be placed into its correct position in the accumulated field. Note that the module was designed for use on 8 or 16 bit integer data taken from medical imaging data. It is able to deal with all the primitive types supported by AVS/Express. However best results are likely to be obtained with either unsigned byte or unsigned short data.

This module has been designed to support the operation of a user macro and hence it may not operate as you would expect. If this module was orientated towards the network editor it would be normal for an array of fields to be input. However as this module is designed to be used manually only one input is present for field. Each region that is grown is presented sequentially to the module and the user is required to decide if they should be accumulated into the output field. This allows the user to easily see the resulting field and decide if it is acceptable or should be refined further.

Please note that the majority of this documentation deals with the detailed functioning of the low-level module. You may find that it useful to look at and experiment with the AccumulateRegionsEg example application before reading the rest of this documentation. Please also note that the accumulate_regions user macro used in the example application provides a much simpler interface and should normally be used in preference to this module.

Inputs

&in_fld

Pointer to a unform 3D scalar field containing a 3D data set. The field should contain a single component of node data. When the go input parameter is trigger the segmented data contained in this field is added to the output.

Parameters

dims_choice

An integer value that specifies if the input field dimensions should be used for the output field. If dims_choice has the value 0 then the output field has the same dimensions as the input. Conversely if dims_choice has the value 1 then the output field has the dimensions given in dims[] parameter.

dims[]

Integer array holding the dimensions of the whole field. This can be used if the input data was cropped and the resulting field needs to be the size of the original field. The values for this parameter are normally obtained from the user interface. If dims_choice is not 1 this parameter is ignored.

go

Flag to trigger the update method. When this parameter is triggered the module takes the data present on the input and accumulates it with whatever data is present on the module output. Normally the user interface would be used to trigger this update.

reset

Flag to reset both the size of the output field and its contents. Before the module is used this parameter should be triggered to ensure that the output field contains zero value data.

dtype

Integer status flag used to store the data type of the output field. This is used to check if the current input has a different data type from the current output. This parameter should not normally be manually changed.

Outputs

out_fld

Output field that contains the data current accumulated by the module. The output field contains a uniform 3D mesh and a single component of node data.

Utility Macros

Several macros are provided to help ease the use of this module. The AccumulateRegions functional macro sets up the AccumulateCore module and provides a link to a parameter block. The accumulate_regions user macro uses that functional macro and also provides a user interface. The user interface is contained in the AccumulateRegionsUI macro. The AccumulateParams parameter block is used to connect these macros.

Example

The example application for this module is called AccumulateRegionsEg and it demonstrates the use of the accumulate_regions user macro. The application also makes use of the region_grow user macro. Please see the RegionGrowEg documentation for information on creating a region.

After starting the application use the region growing module to create a segment. You should see this appear in the output window as a solid red isosurface. To add this region to the final accumulated data set select the go toggle in the Accumulate Regions panel. You see the the false colour isosurface change so that it is the correct green colour. This indicates the region has been accumulated into the output data. If you grow another region you should see that appear in red alongside the accumulated data. Repeat this process until you are satisfied with the output field. Select the reset toggle in the Accumulate Regions panel to clear the output field.

Files

iac_proj/reg_grow/rg_mods.v contains the V definitions of the low-level modules RegionGrowCore, GenerateGuassianProbs and AccumulateCore; and the parameter blocks RegionGrowParams and AccumulateParams.

Other Notes

The low-level RegionGrowMods library containing the module does not specify a process. By default the express process will be used.

Authors

Alex Allen & Joanna Leng.
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
UK
M13 9PL.
Andrew Dodd
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also

GenerateGuassianProbs, RegionGrowCore