Developer documentation
Version 3.0.3-105-gd3941f44
MR::Filter::ConnectedComponents Class Reference

#include "filter/connected_components.h"

Inheritance diagram for MR::Filter::ConnectedComponents:
MR::Filter::Base MR::Header

Protected Attributes

vector< bool > enabled_axes
bool largest_only
bool do_26_connectivity
- Protected Attributes inherited from MR::Filter::Base
std::string message
- Protected Attributes inherited from MR::Header
vector< Axis > axes_
transform_type transform_
std::string name_
KeyValues keyval_
const char * format_
std::unique_ptr< ImageIO::Baseio
 additional information relevant for images stored on file More...
DataType datatype_
 the type of the data as stored on file More...
default_type offset_
 the values by which to scale the intensities More...
default_type scale_
std::array< size_t, 3 > realign_perm_
std::array< bool, 3 > realign_flip_

Additional Inherited Members

- Protected Member Functions inherited from MR::Header
void acquire_io (Header &H)
void check (const Header &H) const
void realign_transform ()
 realign transform to match RAS coordinate system as closely as possible More...
void sanitise_voxel_sizes ()
void sanitise_transform ()
void sanitise_strides ()

Detailed Description

Label all connected components within a binary mask of n-dimensions. This filter will label each component in order of increasing component size

Typical usage:

auto input = Image<bool>::open (argument[0]);
Filter::ConnectedComponents filter (input);
auto output = Image<uint32_t>::create (argument[1], filter);
filter (input, output);
static Image create(const std::string &image_name, const Header &template_header, bool add_to_command_history=true)
Definition: image.h:192
static Image open(const std::string &image_name, bool read_write_if_existing=false)
Definition: image.h:189
vector< ParsedArgument > argument
the list of arguments parsed from the command-line

Definition at line 228 of file connected_components.h.

Member Data Documentation

◆ do_26_connectivity

bool MR::Filter::ConnectedComponents::do_26_connectivity

Definition at line 330 of file connected_components.h.

◆ enabled_axes

vector<bool> MR::Filter::ConnectedComponents::enabled_axes

Definition at line 328 of file connected_components.h.

◆ largest_only

bool MR::Filter::ConnectedComponents::largest_only

Definition at line 329 of file connected_components.h.

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