[Paraview] ParaView 3 Plugin Attempt

Mike Jackson imikejackson at gmail.com
Wed Jun 20 18:58:52 EDT 2007


Sorry for the miss-understanding then.. I want to build my code  
_into_ paraview 3 like I do now for Paraview 2.x. The way that is  
done for ParaView 2.x is by using the  
PVDislocationParaViewImport.cmake file. Is this different now for  
ParaView 3? The PV3 wiki page does not make much of a distinction.


-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Jun 20, 2007, at 5:25 PM, clinton at elemtech.com wrote:

>
> The PARAVIEW_EXTERNAL_MODULE is for building extra code *into*  
> ParaView.
> So you don't use it when building plugins.
>
> Just add
>   FIND_PACKAGE(ParaView REQUIRED)
>   INCLUDE(${PARAVIEW_USE_FILE})
>
> At the top of your CMakeLists.txt file (renamed from
> PVDislocationParaViewImport.cmake)
>
> remove the calls PARAVIEW_INCLUDE_WRAPPED_SOURCES and  
> PARAVIEW_INCLUDE_SOURCES
>
> add
> SOURCES ${PVDislocation_SRCS}
> to the ADD_PARAVIEW_PLUGIN call.
>
> Then do your own run of CMake outside of ParaView, and go from there.
>
> There's also examples you can look at.
>
> Clint
>
> On Wednesday 20 June 2007 3:12:35 pm Mike Jackson wrote:
>> I am attempting to migrate our ParaView 2.x based plugin (Reader and
>> 2 filters) to ParaView 3. I have looked through the examples and read
>> the Wiki Page but I am missing something.
>>
>> I am taking the approach where I tell cmake to use a
>> PARAVIEW_EXTERNAL_MODULE call "PVDislocation". I tell it the source
>> directory and all that. I have a PVDislocationParaViewImport.cmake
>> file at the top level of my PVDislocation directory.
>>
>> When "configuring" in cmake I get the following Error:
>>
>> 538:[mjackson at Thor:pv3]$ cmake ../ParaView3
>> -- Found Qt-Version 4.3.0
>> -- Finding Atomic Data Sizes
>> -- Finding a 64 Bit Integer
>> CMake Error: Error in cmake code at
>> /Users/mjackson/Task_4/Workspace/PVDislocation/
>> PVDislocationParaViewImport.cmake:65:
>> Unknown CMake command "ADD_PARAVIEW_PLUGIN".
>> -- Configuring done
>>
>> Here is the contents of the PVDislocationParaViewImport.cmak file:
>> -------------
>>
>> # specify the name of the module
>> SET(MODULE_NAME PVDislocation)
>>
>> IF(WIN32)
>>      OPTION (WINDOWS_LARGE_FILE_SUPPORT "Access data files larger
>> than 2GB" ON)
>>      IF (WINDOWS_LARGE_FILE_SUPPORT)
>>      	ADD_DEFINITIONS(-DWINDOWS_LARGE_FILE_SUPPORT)
>>      ENDIF (WINDOWS_LARGE_FILE_SUPPORT)
>> ENDIF(WIN32)
>>
>> # Specify non wrapped sources
>> SET (PVDislocation_SRCS
>> 	"${PVDislocation_SOURCE_DIR}/DislocationReader.cpp"
>> 	"${PVDislocation_SOURCE_DIR}/ArbPrecipIO/ArbPrecipReader.cpp"
>> 	"${PVDislocation_SOURCE_DIR}/ArbPrecipIO/ArbPrecipFileHeader.cpp"
>> 	"${PVDislocation_SOURCE_DIR}/ArbPrecipIO/ArbPrecipitateRecord.cpp"
>> 	"${PVDislocation_SOURCE_DIR}/ArbPrecipIO/ArbPrecipIndex.cpp"
>> 	"${PVDislocation_SOURCE_DIR}/ArbPrecipIO/DiscreteParticleFilter.cxx"
>> 	"${PVDislocation_SOURCE_DIR}/GeoPrecipIO/GeoPrecipReader.cpp"
>> )
>>
>> # specify the sources that should be wrapped
>> SET(PVDislocation_WRAPPED_SRCS
>> 	"${PVDislocation_SOURCE_DIR}/vtkFCCGlidePlaneFilter.cxx"
>> 	"${PVDislocation_SOURCE_DIR}/vtkBurgerVectorFilter.cxx"
>> 	"${PVDislocation_SOURCE_DIR}/vtkPrdsDislocationReader.cpp"
>> 	"${PVDislocation_SOURCE_DIR}/vtkPrdsArbPrecipitateReader.cxx"
>> 	"${PVDislocation_SOURCE_DIR}/vtkPrdsGeoPrecipitateReader.cxx"
>> )
>>
>> #-- Set any include Directories this module needs
>> INCLUDE_DIRECTORIES(${PVDislocation_SOURCE_DIR})
>> INCLUDE_DIRECTORIES(${PVDislocation_SOURCE_DIR}/..)
>>
>> #-- We need the front part of the GUI Xml commented out for the
>> Paraview build
>> SET (COMMENT_BEGIN "<!--")
>> SET (COMMENT_END   "-->")
>>
>>
>> #-- Invoke this macro to add link libraries to PV
>> #PARAVIEW_LINK_LIBRARIES("${PVDislocation_LIBS}")
>>
>> #-- Invoke this Macro to add the sources to paraview and
>> #-- wrap them for the client server
>> PARAVIEW_INCLUDE_WRAPPED_SOURCES ("${PVDislocation_WRAPPED_SRCS}")
>>
>> #-- Invoke this macro to include non-wrapped sources in the build
>> PARAVIEW_INCLUDE_SOURCES("${PVDislocation_SRCS}")
>>
>> # Place the package configuration file into the build tree.
>> CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/${MODULE_NAME}.xml.in
>>                 ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_GUI.xml @ONLY
>> IMMEDIATE)
>>
>> # Place the package configuration file into the build tree.
>> CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/${MODULE_NAME}.pvsm.in
>>                 ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_SM.xml @ONLY
>> IMMEDIATE)
>>
>> ADD_PARAVIEW_PLUGIN(PVDisloationSMPlugin "1.0"
>>                      SERVER_MANAGER_XML ${LIBRARY_OUTPUT_PATH}/$
>> {MODULE_NAME}_SM.xml
>>                      SERVER_MANAGER_SOURCES $
>> {PVDislocation_WRAPPED_SRCS} )
>>
>>
>> Any help or pushes in the right direction would be appreciated.
>>
>> Thanks
>> --
>> Mike Jackson
>> imikejackson & gmail * com
>>
>>
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>
>



More information about the ParaView mailing list