<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<STYLE>BODY {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana
}
PRE {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
BLOCKQUOTE {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
A {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
MENU {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DD {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
UL {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DT {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DIR {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
ADDRESS {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H5 {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H6 {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
HR {
        MARGIN-TOP: 0em; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0em; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
P {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
TD {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
TR {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
P.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
LI.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
DIV.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 6pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
LI {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
UL {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
OL {
        MARGIN-TOP: 3pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 3pt; COLOR: #000000; FONT-FAMILY: Verdana,Arial,sans-serif
}
H1 {
        FONT-SIZE: 16pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
H2 {
        FONT-SIZE: 14pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-STYLE: italic; FONT-FAMILY: Verdana,Arial,sans-serif
}
H3 {
        FONT-SIZE: 12pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
H4 {
        FONT-SIZE: 11pt; MARGIN: 12pt 0in 3pt; COLOR: #003366; FONT-FAMILY: Verdana,Arial,sans-serif
}
</STYLE>

<META name=GENERATOR content="MSHTML 8.00.7600.16722"></HEAD>
<BODY style="FONT-FAMILY: Verdana; COLOR: #000000; FONT-SIZE: 10pt" id=ridBody 
background="">
<DIV>&nbsp;</DIV>
<DIV><SPAN class=987312610-28042011>Hi</SPAN></DIV>
<DIV><SPAN class=987312610-28042011></SPAN>&nbsp;</DIV>
<DIV><SPAN class=987312610-28042011>I made a threadded filter inherited from 
Image2ImageFilter and use ThreaddedGenerateData. I calculate my output slicewise 
so my threaddedgeneratedata looks like this:</SPAN></DIV>
<DIV><SPAN class=987312610-28042011></SPAN>&nbsp;</DIV>
<DIV><SPAN class=987312610-28042011>void</SPAN></DIV>
<DIV><SPAN class=987312610-28042011>
<P>ThreadedGenerateData(<FONT color=#0000ff><FONT 
color=#0000ff>const</FONT></FONT> OutputImageRegionType&amp; 
roOutputRegionForThread, <FONT color=#0000ff><FONT 
color=#0000ff>int</FONT></FONT> iThreadId )</P>
<P>{</P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp; </P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp; 
</SPAN>TPOutputImage::IndexType oIndex = roOutputRegionForThread.GetIndex();</P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp; 
</SPAN>TPOutputImage::SizeType oSize = roOutputRegionForThread.GetSize();</P>
<P><SPAN class=987312610-28042011></SPAN>&nbsp;</P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp; 
</SPAN>itk::ProgressReporter oProgress( <FONT color=#0000ff><FONT 
color=#0000ff>this</FONT></FONT>, iThreadId, oSize<SPAN 
class=987312610-28042011>[</SPAN><SPAN 
class=987312610-28042011>2</SPAN>]);</P><SPAN class=987312610-28042011><FONT 
color=#0000ff><FONT color=#0000ff>
<P>&nbsp;</P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp; 
</SPAN>for</FONT></FONT>(<FONT color=#0000ff><FONT 
color=#0000ff>int</FONT></FONT> iCurrentIndex = oIndex[<SPAN 
class=987312610-28042011>2</SPAN>]; iCurrentIndex &lt; oIndex[<SPAN 
class=987312610-28042011>2</SPAN>] + oSize[<SPAN 
class=987312610-28042011>2</SPAN>]; ++iCurrentIndex)</P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp; {</SPAN></P>
<P><SPAN class=987312610-28042011>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//do something</SPAN></P>
<P><SPAN class=987312610-28042011></SPAN><SPAN class=987312610-28042011><SPAN 
class=987312610-28042011>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</SPAN>oProgress.CompletedPixel();</SPAN></P>
<P><SPAN class=987312610-28042011>&nbsp;</SPAN><SPAN 
class=987312610-28042011>&nbsp;&nbsp;&nbsp; }</SPAN></P>
<P></SPAN></SPAN><SPAN class=987312610-28042011>}</SPAN></P></SPAN></DIV>
<DIV><SPAN class=987312610-28042011></SPAN>&nbsp;</DIV>
<DIV><SPAN class=987312610-28042011>But when i watch the progress of my filter i 
get a progress like this:</SPAN></DIV>
<DIV><SPAN class=987312610-28042011></SPAN><SPAN 
class=987312610-28042011>0.00</SPAN></DIV>
<DIV><SPAN class=987312610-28042011>1.00</SPAN></DIV>
<DIV><SPAN class=987312610-28042011></SPAN>&nbsp;</DIV>
<DIV><SPAN class=987312610-28042011>(no substeps)</SPAN></DIV>
<DIV><SPAN class=987312610-28042011></SPAN>&nbsp;</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>