I only changed "SERVER_MANAGER_SOURCES vtkCVSImageReader.cpp" to "SERVER_MANAGER_SOURCES vtkCSV ImageReader.cpp" and the corresponding file name. I didn't touch the class name (which was already vtkCSVImageReader) neither in the xml, nor in the .h. and I can't figure out why there is a *symbol lookup error *since I also tried to build the *ExampleDockPanel *in the paraview>example>plugin>Dockwidget and it works.
here I append my source code maybe the problem is that I didn't implement the *New()* function?: *vtkCSV ImageReader.cpp*: vtkStandardNewMacro(vtkCSVImageReader); int vtkCSVImageReader::RequestInformation ( vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) { vtkInformation* outInfo = outputVector->GetInformationObject(0); return 1; } int vtkCSVImageReader::RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* outputVector) { vtkInformation* outInfo = outputVector->GetInformationObject(0); vtkStructuredGrid* output = vtkStructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT() ) ); vtkPoints* pts= output->GetPoints(); vtkDataArray* dummy=vtkDataArray::CreateDataArray(VTK_FLOAT); dummy->SetNumberOfTuples(8); dummy->SetNumberOfComponents(3); const float P1[3]={0.,0.,0.}; const float P2[3]={1.,0.,0.}; const float P3[3]={0.,1.,0.}; const float P4[3]={1.,1.,0.}; const float P5[3]={0.,0.,1.}; const float P6[3]={1.,0.,1.}; const float P7[3]={0.,1.,1.}; const float P8[3]={1.,1.,1.}; dummy->SetTuple(0, P1); dummy->SetTuple(0, P2); dummy->SetTuple(0, P3); dummy->SetTuple(0, P4); dummy->SetTuple(0, P5); dummy->SetTuple(0, P6); dummy->SetTuple(0, P7); dummy->SetTuple(0, P8); pts->SetData(dummy); return 1; } *vtkCSV ImageReader.h*: class vtkCSVImageReader : public vtkStructuredGridAlgorithm { public: static vtkCSVImageReader* New(); vtkTypeMacro(vtkCSVImageReader,vtkStructuredGridAlgorithm); void PrintSelf(ostream& os, vtkIndent indent); virtual void SetFileName(const char* fname); virtual const char* GetFileName(); virtual void SetFieldDelimiterCharacters( const char* delim); virtual const char* GetFieldDelimiterCharacters(); protected: vtkCSVImageReader(); ~vtkCSVImageReader(); int RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector*); int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector*); vtkDelimitedTextReader * Reader; private: vtkCSVImageReader(const vtkCSVImageReader&); void operator=(const vtkCSVImageReader&); }; PS: I do include the vtkObjectFactory Great thanks 2011/4/27 Utkarsh Ayachit <utkarsh.ayac...@kitware.com> > Did you forget to change the class name in the XML? > > Utkarsh > > 2011/4/27 papa ndéné NDIAYE <pnwirefr...@gmail.com>: > > Hi everyone, > > > > I am trying to make a reader and I get the error message above when > trying > > to open a file. > > I am running Centos5 (64 bit) and compiled paraview with Qt 4.6.3, VTK > > 5.2.1 and CMAKE 2.8.4. > > the same goes for my reader plugin. > > Here is my CmakeList.txt: > > cmake_minimum_required(VERSION 2.6) > > if(COMMAND cmake_policy) > > cmake_policy(SET CMP0003 NEW) > > endif(COMMAND cmake_policy) > > FIND_PACKAGE(ParaView REQUIRED) > > INCLUDE(${PARAVIEW_USE_FILE}) > > INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ../) > > > > ADD_PARAVIEW_PLUGIN(CSVImage "1.0" > > SERVER_MANAGER_XML CSVImage.xml > > SERVER_MANAGER_SOURCES vtkCVSImageReader.cpp > > GUI_RESOURCE_FILES CSVImageGUI.xml > > ) > > > > and I get error: > > > > vtkProcessModule (0xb621b30): Cannot create object of type > > "vtkCSVImageReader". > > while processing > > Message 0 = New > > Argument 0 = string_value {vtkCSVImageReader} > > Argument 1 = id_value {149} > > > > > > when I change the CVS to CSV (renaming the .cpp file too) I get another > > error: > > > > paraview: symbol lookup error: > > ~/dev/CVSreader/libCSVImage.so: undefined symbol: > _ZN17vtkCSVImageReaderC1Ev > > > > which I do not understand since I built both paraview and the plugin on > the > > same computer > > > > hope someone could help me. > > > > Regards > > papa > > > > > > > > _______________________________________________ > > Powered by www.kitware.com > > > > Visit other Kitware open-source projects at > > http://www.kitware.com/opensource/opensource.html > > > > Please keep messages on-topic and check the ParaView Wiki at: > > http://paraview.org/Wiki/ParaView > > > > Follow this link to subscribe/unsubscribe: > > http://www.paraview.org/mailman/listinfo/paraview > > > > >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview