mix.setImageCaptureMetadata(icm);
iam = new ImageAssessmentMetadata();
mix.setImageAssessmentMetadata(iam);
sm = new SpatialMetrics ();
iam.setSpatialMetrics(sm);
ice = new ImageColorEncoding ();
iam.setImageColorEncoding(ice);
gci = new GeneralCaptureInformation ();
icm.setGeneralCaptureInformation(gci);
// Here are some pieces which are constructed once, but added only if they're needed.