Optimal quantization applied to sliced inverse regression