I did look at the constant.br sample, since I thought that would help.
Unfortunately, this doesn't solve the problem since in your example, K is a constant and I stated I would like it to increment. The other problem is that I do not want to flatten my 3D volume to a 1D volume, if at all possible.
For instance, if the steam size is 2,2,4
0,0,0 =1
0,0,1=2
0,0,2=3
0,0,3=4
0,1,0=1
0,1,1=2
0,1,2=3
0,1,3=4
.........
.......
1,1,3=4
It looks to me like your example makes every element of the stream be 30 (//or some arbitrary value), or am I misunderstanding your example?
Thanks.