Hi, I have been playing with writing a reader for ParaView. I followed the Kitware instructions from here
http://www.kitware.com/products/html/WritingAParaViewReaderPlug-in.html I managed to get the source to build and ended up with a .so file as expected. When I try and load in ParaView via Tools-> ManagePlugins ->Load new, I get the following error mydevelopment/pvplugin/cvsReader/build/libCSVImage.so: undefined symbol: _ZTV17vtkCSVImageReader If I do *nm libCSVImage.so | grep " _ZTV17vtkCSVImageReader", *the output is U _ZTV17vtkCSVImageReader Can some one please give me any pointers? I am on Ubuntu-12.04, gcc-4.4.7 and ParaView-3.14.1 on a 32bit machine. I am also attaching the code I used to generate the .so files. Regards, Rakesh
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(NOT ParaView_BINARY_DIR)
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
ENDIF(NOT ParaView_BINARY_DIR)
IF(PARAVIEW_BUILD_QT_GUI)
ADD_PARAVIEW_PLUGIN(CSVImage "1.0"
SERVER_MANAGER_XML CSVImage.xml
SERVER_MANAGER_SOURCES vtkCSVImageReader.cxx
GUI_RESOURCE_FILES CSVImageGUI.xml
)
ENDIF(PARAVIEW_BUILD_QT_GUI)
<ServerManagerConfiguration>
<ProxyGroup name="sources"
<SourceProxy
name="CSVImageReader"
class="vtkCSVImageReader"
label="Image reader">
<Documentation
short_help="Read a PNG file."
long_help="Read a PNG file into an image data.">
The PNG reader reads PNG (Portable Network Graphics) files, and the output is a uniform rectilinear (image/volume) dataset. The default file extension is .png.
</Documentation>
<StringVectorProperty
name="FileName"
animatable="0"
command="SetFileName"
<!-- command="SetFieldDelimiterCharacters">
default_values=","
number_of_elements="1"/>
<FileListDomain name="files"/>
<Documentation>
This property specifies the file name for the PNG reader.
</Documentation>
</StringVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration><ParaViewReaders>
<Reader
name="CSVImageReader"
extensions="csvimg"
file_description="CSV image">
</Reader>
</ParaViewReaders>
vtkCSVImageReader.cxx
Description: Binary data
#include<vtkInformation.h>
#include<vtkAlgorithm.h>
#include<vtkTable.h>
#include<vtkImageAlgorithm.h>
#include<vtkDelimitedTextReader.h>
#include<vtkInformationVector.h>
#include<vtkTable.h>
#include<vtkImageData.h>
#include<vtkPointData.h>
#include<vtkVariant.h>
#include<vtkPointData.h>
#include <vtkStreamingDemandDrivenPipeline.h>
class vtkCSVImageReader : public vtkImageAlgorithm
{
public:
static vtkCSVImageReader* New();
vtkTypeRevisionMacro(vtkCSVImageReader,vtkImageAlgorithm);
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();
//vtkCxxRevisionMacro(vtkCSVImageReader, "$Revision$");
protected:
vtkCSVImageReader();
~vtkCSVImageReader();
int RequestInformation(
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
int RequestData(
vtkInformation*,
vtkInformationVector**,
vtkInformationVector*);
vtkDelimitedTextReader* Reader;
private:
vtkCSVImageReader(const vtkCSVImageReader&);
void operator=(const vtkCSVImageReader&);
};
_______________________________________________ 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
