[Paraview] Question about building reader plugin

shenyanwen shenyanwen at gmail.com
Wed Apr 1 02:28:53 EDT 2009


Hello, everyone!
I am trying to build my own reader into ParaView as a plugin. But after I
put my source file and XML files and the CMakeLists file into the specific
directory and I used CMake to build it. Then I open the sln file it created.
I just choose ALL_BUILD and I ran to many errors like below:

error C2504: 'vtkIamgeAlgorithm' : base class undefined
 error C2440: 'static_cast' : cannot convert from 'vtkObjectBase *' to
'vtkSgnReader *'
error C2440: 'return' : cannot convert from 'vtkSgnReader *' to
'vtkObjectBase *'
'GetDebug' : is not a member of 'vtkSgnReader'
'GetClassName' : is not a member of 'vtkSgnReader'
.....
.....
error C2664: 'vtkIamgeAlgorithmCommand' : cannot convert parameter 2 from
'vtkSgnReader *' to 'vtkObjectBase *

And here is my header file:
#ifndef __vtkSgnReader_h_
#define __vtkSgnReader_h_

#include "vtkImageAlgorithm.h"
#include "vtkSgn.h"               //Needed for read actual META_DATA

class VTK_EXPORT vtkSgnReader : public vtkIamgeAlgorithm
{
public:
    static vtkSgnReader* New();
    vtkTypeRevisionMacro(vtkSgnReader, vtkImageAlgorithm);
    void PrintSelf(ostream& os, vtkIndent indent);

    vtkSetStringMacro( FileName );
    vtkGetStringMacro( FileName );
    virtual int ReadMetaData(vtkInformation* *outInfo);
protected:
    vtkSgnReader();
    ~vtkSgnReader();

    virtual int RequestData(vtkInformation *, vtkInformationVector **,
                            vtkInformationVector *);
    virtual int RequestInformation(vtkInformation *, vtkInformationVector
**,
                                   vtkInformationVector *);
    virtual int FillOutputPortInformation(int, vtkInformation *);
public:
    vtkSgn sgnfile;
    char *FileName;

private:
    vtkSgnReader(const vtkSgnReader&);      //Not implemented
    void operator=(const vtkSgnReader&);   //Not implemented
};
#endif

Plase help me . Thanks so much!

-- 
shenyanwen at gmail.com
Mobile Phone:13476177952
Tel: 027-87558144
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090401/f6dd549c/attachment-0001.htm>


More information about the ParaView mailing list