How did you compile CASToR ? If you used cmake, you should set the CASToR_BUILD_SAMPLE_UTILITIES variable to on first in order to recompile castor-PetScannerLutEx with the modifications you made. This could be a reason why there is no change in the output.