Modify do loop

Nowdasy, I’m trying to run the examples of multi-components created by Palabos. The code is running fine and I got some silce contour image. Is it possible to get it in 3D contour image? The below is the do loop but I do n’t have experience how we can modify this do loop any help to create the image in 3D image contour is very welcome:

/// Writes the Gif files
if (iT%saveIter==0) {
OstreamManager cout(std::cout,“plotStatistics”);

cout << "Writing Gif..." << std::endl;
int nx = latticeOne.getNx();
ImageWriter<T> imageCreator("leeloo.map");

imageCreator.writeScaledGif(createFileName("p", iT, 6),
                            latticeOne.getDataAnalysis().getPressure().slicex(nx/2),
                           400,400);

}

Thank you