Files
doc_phd_thesis/021_VideoCoding/Figures/Tiles_Slices_Example_2.tikz
T

82 lines
2.2 KiB
Plaintext

% \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=4pt,font=\large]
\tikzstyle{SlicePattern}=[pattern color=gray!70]
\tikzstyle{Slice1}=[SlicePattern, pattern=north west lines]
\tikzstyle{Slice2}=[SlicePattern, pattern=dots]
\tikzstyle{Slice3}=[SlicePattern, pattern=bricks]
\tikzstyle{Slice4}=[SlicePattern, pattern=crosshatch, step=1pt]
\tikzstyle{Slice5}=[SlicePattern, pattern=north east lines]
% \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}
{
\ifthenelse{\themaincounter < 14}
{
\node[CTU] at (\x,\y) {\themaincounter};
}
{
\node[CTU,Slice1] at (\x,\y) {\themaincounter};
}
\addtocounter{maincounter}{1}
}
\foreach \y in {0,-1,...,-8}
\foreach \x in {3,4,5}
{
\ifthenelse{\themaincounter < 44}
{
\node[CTU,Slice2] at (\x,\y) {\themaincounter};
}
{
\node[CTU,Slice3] at (\x,\y) {\themaincounter};
}
\addtocounter{maincounter}{1}
}
\foreach \y in {0,-1,...,-8}
\foreach \x in {6,7,8}
{
\ifthenelse{\themaincounter < 69}
{
\node[CTU,Slice4] at (\x,\y) {\themaincounter};
}
{
\node[CTU,Slice5] at (\x,\y) {\themaincounter};
}
\addtocounter{maincounter}{1}
}
\path[Tile] (3,1) -- ++(0,-9);
\path[Tile] (6,1) -- ++(0,-9);
\node[TileLabel] at (.5*9/3,-1) {Slice \#1};
\node[TileLabel] at (.5*9/3,-6) {Slice \#2};
\node[TileLabel] at (1.5*9/3,-2) {Slice \#3};
\node[TileLabel] at (1.5*9/3,-7) {Slice \#4};
\node[TileLabel] at (2.5*9/3,-1) {Slice \#5};
\node[TileLabel] at (2.5*9/3,-6) {Slice \#6};
\draw[white] (-.4,2) rectangle (9.4,-9);
\end{tikzpicture}