I don't really understand what you are doing but one obvious thing from the header is that the BTX/ETX is around the wrong way:<div><br></div><div><div>//ETX</div><div>#include "itkImage.h"</div><div>//BTX</div>
<div><br></div><div>should be:</div><div><div><br></div><div>//BTX</div><div>#include "itkImage.h"</div><div>//ETX</div></div><div><br></div><div>I didn't even realise that the the parser work for templates though...</div>
<div><br></div><div>Regards,</div><div>Paul</div><br><div class="gmail_quote">On 24 February 2010 08:55, Christian Werner <span dir="ltr"><<a href="mailto:christian.werner@rwth-aachen.de">christian.werner@rwth-aachen.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello!<br>
<br>
I am writng a plugin for my paraview. I already succeeded doing this with another filter but this one drives me crazy. I keep getting these<br>
<br>
"*** SYNTAX ERROR found in parsing the header file /home/christian/programming/pv-plugins/Transformation/ivtkSampleFilter.h before line 8 ***<br>
<br>
messages, no matter where I put these //BTX //ETX. This is my header:<br>
<br>
<br>
#ifndef IVTK_SAMPLE_FILTER<br>
#define IVTK_SAMPLE_FILTER<br>
<br>
#include "vtkObjectFactory.h"<br>
#include "vtkSimpleImageToImageFilter.h"<br>
#include "xtkBox.h"<br>
<br>
class VTK_IMAGING_EXPORT ivtkSampleImageFilter : public vtkSimpleImageToImageFilter {<br>
public:<br>
static ivtkSampleImageFilter* New();<br>
<br>
vtkTypeMacro( ivtkSampleImageFilter, vtkSimpleImageToImageFilter);<br>
protected:<br>
ivtkSampleImageFilter();<br>
ivtkSampleImageFilter(const ivtkSampleImageFilter&) {};<br>
void operator=(const ivtkSampleImageFilter&) {};<br>
<br>
//override from vtkImageToImageFilter<br>
virtual void SimpleExecute(vtkImageData* inp, vtkImageData* out);<br>
<br>
//BTX<br>
vtkImageData* vtkResultImage;<br>
//ETX<br>
vtkITKFilter_H_Macro;<br>
/// custom Filter function ///<br>
template <typename ImageType><br>
void ApplyFilter(vtkImageData* vtkInput);<br>
};<br>
#endif<br>
<br>
It also complains if I comment out my #include "xtkBox.h", or put some //BTX//ETX all around other places. It keeps coming with the error message as if I did not even edit the right file. (I do, I checked that... :)<br>
<br>
I call a macro later in the header which is defined in the xtkBox.h but the compiler does not even care if it is defined or not. Anyway, for completeness I attached this xtkBox.h.<br>
<br>
Does anyone see what I am missing?<br>
<br>
<br>
Best regards,<br>
Chrsitian<br>
<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 <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>