Added control for number of slices to pca and ica