<div dir="ltr">Hi Bogdan,<div><br></div><div>It seems that your email was sent from Nabble, instead of being</div><div>sent directly to the ITK mailing list, and as a result, the code snippet </div><div>was stripped. (Please submit your emails to the itk mailing list</div>
<div>directly, instead of sending them through Nabble.)</div><div><br></div><div><br></div><div>Let me paste the code snippet below:</div><div><br></div><div>-----------------------------------------------------</div><div>
<span style="color:rgb(0,0,0);font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">Here the code snippet:    </span><pre style="color:rgb(0,0,0)">    typedef signed short TPixelType;
    typedef itk::DiffusionTensor3DReconstructionImageFilter<TPixelType, TPixelType> DiffusionTensorReconstructionFilterType;
    DiffusionTensorReconstructionFilterType::Pointer tensorReconstructionFilter =  DiffusionTensorReconstructionFilterType::New();

    // Setup filter's reference and gradient images
    // ...

    MyCommand::Pointer myCommand = MyCommand::New();
    tensorReconstructionFilter->AddObserver(itk::ProgressEvent(), myCommand);

    tensorReconstructionFilter->SetBValue(bValue);
    tensorReconstructionFilter->SetThreshold(thresholdValue);
    tensorReconstructionFilter->SetNumberOfThreads(1);
    tensorReconstructionFilter->Update();</pre></div><div>-----------------------------------------------------<br></div><div><br></div><div>Your usage of the command observer seems to be correct here.</div><div><br></div>
<div><br></div><div>Adding the following change to the test of the DiffusionTensor3DReconstructionImageFilter</div><div><br></div><div><div>git diff .</div><div>diff --git a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx b/Modules/Filter</div>
<div>index c29509b..c2b9b3d 100644</div><div>--- a/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx</div><div>+++ b/Modules/Filtering/DiffusionTensorImage/test/itkDiffusionTensor3DReconstructionImageFilterTest.cxx</div>
<div>@@ -17,6 +17,7 @@</div><div>  *=========================================================================*/</div><div> #include "itkDiffusionTensor3DReconstructionImageFilter.h"</div><div> #include "itkImageRegionIteratorWithIndex.h"</div>
<div>+#include "itkFilterWatcher.h"</div><div> #include <iostream></div><div> </div><div> int itkDiffusionTensor3DReconstructionImageFilterTest(int, char*[])</div><div>@@ -135,6 +136,8 @@ int itkDiffusionTensor3DReconstructionImageFilterTest(int, char*[])</div>
<div>     std::cout << std::endl << "This filter is using " <<</div><div>       tensorReconstructionFilter->GetNumberOfThreads() << " threads " << std::endl;</div><div>
 </div><div>+    FilterWatcher watcher( tensorReconstructionFilter, "Tensor Reconstruction");</div><div>+</div><div>     tensorReconstructionFilter->Update();</div><div> </div><div>     typedef TensorReconstructionImageFilterType::TensorImageType TensorImageType;</div>
</div><div><br></div><div><br></div><div><br></div><div>Confirms that the progress reporting is not implemented,</div><div>since we get the following output</div><div><br></div><div><div>2: ITK test driver caught an ITK exception:</div>
<div>2: </div><div>2: itk::ExceptionObject (0x1fdfbf0)</div><div>2: Location: "unknown" </div><div>2: File: /home/ibanez/src/ITK/Modules/Core/TestKernel/include/itkFilterWatcher.h</div><div>2: Line: 121</div><div>
2: Description: itk::ERROR: DiffusionTensor3DReconstructionImageFilter(0x7fff4f1c5570): Filter does not have progress.</div><div>2: </div></div><div><br></div><div><br></div><div><br></div><div><br></div><div>The following patch should fix the issue:</div>
<div><br></div><div><a href="http://review.source.kitware.com/#/c/14794/">http://review.source.kitware.com/#/c/14794/</a><br></div><div><br></div><div><br></div><div>It introduces the ProgressReporter class into the filter.</div>
<div><br></div><div><br></div><div><br></div><div>   Thanks</div><div><br></div><div><br></div><div>        Luis</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 14, 2014 at 11:23 AM, Bodyagon <span dir="ltr"><<a href="mailto:zubrolet@gmail.com" target="_blank">zubrolet@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, guys!<br>
<br>
I have a problem with observing<br>
itk::DiffusionTensor3DReconstructionImageFilter's progress events. It seems,<br>
that this filter doesn't send any itk::ProgressEvent objects to observer. In<br>
the filter's code I also didn't find any mention of itk::ProgressReporter or<br>
something related to progress.<br>
<br>
Here the code snippet:<br>
<br>
Could you tell me, is there anyway to observe this filter's progress? Or<br>
this filter is intended to work without any progress notification?<br>
<br>
Thanks,<br>
Bogdan<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/Progress-events-and-DiffusionTensor3DReconstructionImageFilter-tp7585190.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/Progress-events-and-DiffusionTensor3DReconstructionImageFilter-tp7585190.html</a><br>

Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
</blockquote></div><br></div>