An important step in the analysis of liquid water distributions in high resolution tomographies of PEMFCs is the segmentation of water and cell materials. This is conducted via subtraction of the dry from the operated state of the cells. The morphology of the gas diffusion layer (GDL) slightly changes due to membrane swelling at high humidification that makes quantification of water amounts hardly possible and leads to artifacts and false water detection. Here we present a computational algorithm identifying the changes in GDL morphology via local shift detection of the tomographic data sets that allows for an optimal quantification of water amounts. We compare the technique with typical global alignment methods. The results reveal huge errors in water quantification of up to 50% for the global alignment method that can be mostly avoided by using the presented technique. The morphology correction algorithm can basically be applied to many research fields, where operando measurements are important. This applies for a wide variety of materials employed in most types of fuel cells, electrolyzer cells, batteries and hydrogen storage systems.