merge
Description
merges two or more gTruthMerged
= merge(gTruth1,gTruth2,...,gTruthn
)groundTruthMedical
objects into a new
groundTruthMedical
object,
gTruthMerged
.
Examples
Merge Medical Ground Truth Data
Merge two compatible groundTruthMedical
objects
present in the MATLAB® workspace.
The ground truth objects, gTruthMed1
and
gTruthMed2
, specify the volumetric data source and label image for
the CT lung volumes, lung_001.nii.gz
and
lung_003.nii.gz
, respectively.
gTruthMed1
gTruthMed1 = groundTruthMedical with properties: DataSource: [1×1 medical.labeler.loading.VolumeSource] LabelData: "C:\Merge\Label Data\lung_001.nii.gz" LabelDefinitions: [1×3 table]
gTruthMed2
gTruthMed2 = groundTruthMedical with properties: DataSource: [1×1 medical.labeler.loading.VolumeSource] LabelData: "C:\Merge\Label Data\lung_003.nii.gz" LabelDefinitions: [1×3 table]
Merge the groundTruthMedical
objects. The merged object specifies
both lung CT volumes.
gTruthMerged = merge(gTruthMed1,gTruthMed2)
gTruthMerged = groundTruthMedical with properties: DataSource: [1×1 medical.labeler.loading.VolumeSource] LabelData: [2×1 string] LabelDefinitions: [1×3 table]
Input Arguments
gTruth1,gTruth2,...,gTruthn
— Ground truth data to merge
groundTruthMedical
objects
Ground truth data to merge, specified as a comma-separated list of two or more
groundTruthMedical
objects. You can export the
groundTruthMedical
objects from the Medical Image Labeler
app or create them programmatically by using the groundTruthMedical
function.
The specified groundTruthMedical
objects must all have the same
data source type, specified by the DataSource
property. For
example, if one object has a data source of type VolumeSource
, all
groundTruthMedical
objects you merge it with must also have a data
source of type VolumeSource
.
You cannot merge groundTruthMedical
objects that have one or more
DataSource
entries pointing to the same file location. Each
groundTruthMedical
object must specify a unique set of image
sequences or image volumes
If the LabelDefinition
properties of two or more objects
specify the same label name, they must also specify the same color and pixel label ID
for that label name. The label name, color, and pixel label ID are specified by the
LabelName
, LabelColor
, and
PixelLabelID
columns of the LabelDefinition
property.
Output Arguments
gTruthMerged
— Merged ground truth data
groundTruthMedical
object
Merged ground truth data, returned as a groundTruthMedical
object.
The DataSource
property of gTruthMerged
is the
same as that of the input groundTruthMedical
objects.
Version History
Introduced in R2022b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)