build class ofImageStack