I found a work around. When you are outputting the foreach in the example instead of:
echo nggShowGallery( $nextgen_gallery_id['ngg_id']); //NextGEN Gallery gallery
replace this with a shortcode for the gallery style you need and then run do_shortcode:
$galleryID = $nextgen_gallery_id['ngg_id'];
$galleryShortcode = '[ngg_images gallery_ids="' . $galleryID . '" display_type="photocrati-nextgen_pro_masonry" override_thumbnail_settings="1"
size="390" images_per_page="20" spacing="10"]';
echo do_shortcode($galleryShortcode);
This will output a NextGen Gallery in the Plus/Pro Masonary style. I include some thumbnail sizing and other attributes that you might find useful.
Obviously hard coding these style options will mean all galleries will be the same. If you want more control you would need to create custom fields for each property you want to vary and build this into your shortcode.