ExtractLabels¶
-
MLModule
¶ genre Unary
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLBasicModules
definition mlBasicModules.def see also Arithmetic1
keywords bitmask
,binary
,arithmetic
,combine
,object
,segmentation
Purpose¶
The module ExtractLabels
is designed to simplify label image handling by allowing to extract up to 20 objects identified via a specific (sub)bitmask from a given (integer) label image.
In contrast to a mere AND operation with the bitmask, it supports the extraction of all 2n objects that can be represented by an n-bit label image.
Usage¶
Connect the label image to input0 and specify the object label bits to search for. In addition, you must define the bits of interest, i.e., those bits for which the object label must be equal to a label image voxel.
Details¶
The formula applied to each voxel v is:
v := ((v & bitsOfInterest) == labelBits) ? outputValue : 0
When the binary representation of label bits or bits of interest is longer than 64 characters, only the last 64 characters will have an effect on the resulting bit mask.
Characters in the binary representation other than ‘0’ and ‘1’ will be handled as ‘1’.
Output Fields¶
Parameter Fields¶
Field Index¶
Visible Fields¶
Maximum Number of Active Output Connections¶
-
name:
numActiveOutputs
, type:
Integer
, default:
1
, minimum:
1
, maximum:
20
¶ Sets the number of currently usable output images. Outputs beyond the range are invalidated and hidden if no connection is currently present.
Label Bits (labelBits0)¶
-
name:
labelBits0
, type:
Integer
, default:
128
, deprecated name:
labelBits
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary0)¶
-
name:
labelBitsBinary0
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest0)¶
-
name:
bitsOfInterest0
, type:
Integer
, default:
192
, deprecated name:
bitsOfInterest
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary0)¶
-
name:
bitsOfInterestBinary0
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue0)¶
-
name:
outputValue0
, type:
Integer
, default:
255
, deprecated name:
outputValue
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits1)¶
-
name:
labelBits1
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary1)¶
-
name:
labelBitsBinary1
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest1)¶
-
name:
bitsOfInterest1
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary1)¶
-
name:
bitsOfInterestBinary1
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue1)¶
-
name:
outputValue1
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits2)¶
-
name:
labelBits2
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary2)¶
-
name:
labelBitsBinary2
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest2)¶
-
name:
bitsOfInterest2
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary2)¶
-
name:
bitsOfInterestBinary2
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue2)¶
-
name:
outputValue2
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits3)¶
-
name:
labelBits3
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary3)¶
-
name:
labelBitsBinary3
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest3)¶
-
name:
bitsOfInterest3
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary3)¶
-
name:
bitsOfInterestBinary3
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue3)¶
-
name:
outputValue3
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits4)¶
-
name:
labelBits4
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary4)¶
-
name:
labelBitsBinary4
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest4)¶
-
name:
bitsOfInterest4
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary4)¶
-
name:
bitsOfInterestBinary4
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue4)¶
-
name:
outputValue4
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits5)¶
-
name:
labelBits5
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary5)¶
-
name:
labelBitsBinary5
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest5)¶
-
name:
bitsOfInterest5
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary5)¶
-
name:
bitsOfInterestBinary5
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue5)¶
-
name:
outputValue5
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits6)¶
-
name:
labelBits6
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary6)¶
-
name:
labelBitsBinary6
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest6)¶
-
name:
bitsOfInterest6
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary6)¶
-
name:
bitsOfInterestBinary6
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue6)¶
-
name:
outputValue6
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits7)¶
-
name:
labelBits7
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary7)¶
-
name:
labelBitsBinary7
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest7)¶
-
name:
bitsOfInterest7
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary7)¶
-
name:
bitsOfInterestBinary7
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue7)¶
-
name:
outputValue7
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits8)¶
-
name:
labelBits8
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary8)¶
-
name:
labelBitsBinary8
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest8)¶
-
name:
bitsOfInterest8
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary8)¶
-
name:
bitsOfInterestBinary8
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue8)¶
-
name:
outputValue8
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits9)¶
-
name:
labelBits9
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest are ignored.
/ (labelBitsBinary9)¶
-
name:
labelBitsBinary9
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest9)¶
-
name:
bitsOfInterest9
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary9)¶
-
name:
bitsOfInterestBinary9
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue9)¶
-
name:
outputValue9
, type:
Integer
, default:
255
¶ Sets the output value of object voxels. If the label value shall be used, simply connect from labelBits.
Label Bits (labelBits10)¶
-
name:
labelBits10
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary10)¶
-
name:
labelBitsBinary10
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest10)¶
-
name:
bitsOfInterest10
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary10)¶
-
name:
bitsOfInterestBinary10
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue10)¶
-
name:
outputValue10
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits11)¶
-
name:
labelBits11
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary11)¶
-
name:
labelBitsBinary11
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest11)¶
-
name:
bitsOfInterest11
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary11)¶
-
name:
bitsOfInterestBinary11
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue11)¶
-
name:
outputValue11
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits12)¶
-
name:
labelBits12
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary12)¶
-
name:
labelBitsBinary12
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest12)¶
-
name:
bitsOfInterest12
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary12)¶
-
name:
bitsOfInterestBinary12
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue12)¶
-
name:
outputValue12
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits13)¶
-
name:
labelBits13
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary13)¶
-
name:
labelBitsBinary13
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest13)¶
-
name:
bitsOfInterest13
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary13)¶
-
name:
bitsOfInterestBinary13
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue13)¶
-
name:
outputValue13
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits14)¶
-
name:
labelBits14
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary14)¶
-
name:
labelBitsBinary14
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest14)¶
-
name:
bitsOfInterest14
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary14)¶
-
name:
bitsOfInterestBinary14
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue14)¶
-
name:
outputValue14
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits15)¶
-
name:
labelBits15
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary15)¶
-
name:
labelBitsBinary15
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest15)¶
-
name:
bitsOfInterest15
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary15)¶
-
name:
bitsOfInterestBinary15
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue15)¶
-
name:
outputValue15
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits16)¶
-
name:
labelBits16
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary16)¶
-
name:
labelBitsBinary16
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest16)¶
-
name:
bitsOfInterest16
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary16)¶
-
name:
bitsOfInterestBinary16
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue16)¶
-
name:
outputValue16
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits17)¶
-
name:
labelBits17
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary17)¶
-
name:
labelBitsBinary17
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest17)¶
-
name:
bitsOfInterest17
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary17)¶
-
name:
bitsOfInterestBinary17
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue17)¶
-
name:
outputValue17
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits18)¶
-
name:
labelBits18
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary18)¶
-
name:
labelBitsBinary18
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest18)¶
-
name:
bitsOfInterest18
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary18)¶
-
name:
bitsOfInterestBinary18
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.
Output Value (outputValue18)¶
-
name:
outputValue18
, type:
Integer
, default:
255
¶ Output value of object voxels. If the label value shall be used, simply connect from labelBits1.
Label Bits (labelBits19)¶
-
name:
labelBits19
, type:
Integer
, default:
128
¶ Sets the exact label that is to be extracted from the input image. Bits not set in bitsOfInterest1 are ignored.
/ (labelBitsBinary19)¶
-
name:
labelBitsBinary19
, type:
String
, default:
10000000
¶ Sets the binary representation of label bits.
Bits Of Interest (bitsOfInterest19)¶
-
name:
bitsOfInterest19
, type:
Integer
, default:
192
¶ Sets the bits of interest within the input image
/ (bitsOfInterestBinary19)¶
-
name:
bitsOfInterestBinary19
, type:
String
, default:
11000000
¶ Sets the binary representation of the bits of interest.