<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-02-24 15:59 GMT+01:00 Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">2016-02-24 15:57 GMT+01:00 David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Feb 24, 2016 at 7:31 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Do things printed with vtkErrorMacro (like in vtkMINCImageAttributes) really pass through this observer mechanism?<br></div></div></div></blockquote><div><br></div></span><div>Yes, they do.  But it looks like the error is generated by the vtkMINCImageAttributes object, so that's the object that needs to be observed.  I'm not sure it can be accessed, but give it a try.</div></div></div></div></blockquote><div><br></div></span><div>Ah, *facepalm*. Of course. I'll see if it can be done, otherwise I'll have to live with it.<br></div></div></div></div></blockquote><div><br></div><div>This worked fine:<br><br>    def _handleMINCImageAttributesError(self, attributes, event):<br>        pass<br><br></div><div>and then<br><br>        self.reader = vtkMINCImageReader()<br>        self.reader.GetImageAttributes().AddObserver(<br>            vtkCommand.ErrorEvent, self._handleMINCImageAttributesError)<br><br></div><div>Good thing that the attributes object is available before the image has been loaded.<br><br></div><div>I'll try to filter out just those bogus errors with some string matching.<br><br></div><div>Elvis<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Thanks,<br></div><div>Elvis<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><font color="#888888"><div><br></div><div> - David <br></div></font></span></div></div></div>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div>