Context. The improvement of large size detectors permitted the development of integral field spectrographs (IFSs) in astronomy. Spectral information for each spatial element of a two-dimensional field of view is obtained thanks to integral field units that spread the spectra on the 2D grid of the sensor. Aims. Here we aim to solve the inherent issues raised by standard data-reduction algorithms based on direct mapping of the 2D + λ data cube: the spectral cross-talk due to the overlap of neighbouring spectra, the spatial correlations of the noise due to the re-interpolation of the cube on a Cartesian grid, and the artefacts due to the influence of defective pixels. Methods. The proposed method, Projection, Interpolation, and Convolution (PI...