Did you read the documentation of setIconPrefix()? Why do you want to create the icon images from externally stored PGM files, if you don't have them? By default, the icon images are created from the referenced DICOM files.