% \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,% % decorations.pathreplacing,decorations.pathmorphing,shapes,% % matrix,shapes.symbols,plotmarks,decorations.markings,shadows,backgrounds} \newcommand{\scale}{.65} \begin{tikzpicture}[auto, on grid, scale=\scale,every node/.style={scale=\scale} ] \tikzstyle{CTU}=[draw, text centered, minimum size=1cm,anchor=south west] \tikzstyle{Tile}=[draw, line width=1.5pt] \tikzstyle{TileLabel}=[text centered,fill=white,inner sep=0,font=\large] % \newcounter{maincounter} \setcounter{maincounter}{1} \foreach \x in {1,4,7} { \node[TileLabel] at (\x + .5,1.5cm) {Tile \#\themaincounter}; \addtocounter{maincounter}{1} } \setcounter{maincounter}{1} \foreach \y in {0,-1,...,-8} \foreach \x in {0,1,2} { \node[CTU] at (\x,\y) {\themaincounter}; \addtocounter{maincounter}{1} } \foreach \y in {0,-1,...,-8} \foreach \x in {3,4,5} { \node[CTU] at (\x,\y) {\themaincounter}; \addtocounter{maincounter}{1} } \foreach \y in {0,-1,...,-8} \foreach \x in {6,7,8} { \node[CTU] at (\x,\y) {\themaincounter}; \addtocounter{maincounter}{1} } \path[Tile] (3,1) -- ++(0,-9); \path[Tile] (6,1) -- ++(0,-9); \draw[draw=red,densely dashed,black!70!green] (-.1,1+.1) rectangle (9.1,-8-.1); \node[TileLabel] at (9/2,-8.5) {Slice \#1}; \draw[white] (-.4,2) rectangle (9.4,-9); \end{tikzpicture}