Commit 9c07219f authored by Nicolas Vuaille's avatar Nicolas Vuaille

Catalyst Editions

 * update guide to write manifest.json
 * add description of existing editions
parent 01b46e4b
......@@ -23,8 +23,10 @@ customized Catalyst builds. Assuming that the desired editions have already been
second step is automated and is done by invoking the following command from the
\textless ParaView\_source\_dir\textgreater /Catalyst directory:
\begin{minted}{python}
python catalyze.py -i <edition_dir> -o <Catalyst_source_dir>
python catalyze.py -r <paraview_sources> -i <edition_dir> -o <Catalyst_source_dir>
\end{minted}
Where \textless paraview\_sources\textgreater{} is the directory containing the ParaView sources and
\textless edition\_dir\textgreater{} is the directory containing the edition configuration files.
Note that more editions can be added with the -i \textless edition\_dir\textgreater \,and that these are processed in
the order they are given, first to last. For the minimal base edition included with ParaView, this
would be -i Editions/Base. The generated Catalyst source tree will be put in
......@@ -37,6 +39,7 @@ The next step is to build Catalyst (e.g. using make on Linux systems).
\subsection{Creating a ParaView Catalyst Edition}
The main operations for creating an edition of Catalyst are:
\begin{enumerate}
\item Choose one or more editions to be the basis of the new one [optional]
\item Set CMake build parameters (e.g. static or shared library build).
\item Specify files from the ParaView source tree to be copied into the created Catalyst source tree.
\item Specify files from the edition to be copied into the Catalyst source tree.
......@@ -46,6 +49,30 @@ The information describing which files are in the generated Catalyst source tree
JSON file called manifest.json in the main directory of the edition. The user processes this
information with a Python script called catalyze.py that is located in the
\textless ParaView\_source\_dir\textgreater/Catalyst directory.
\subsection{Customizing editions}
Whereas creating a new edition from scratch may be quite complex, it is possible to extend
an existing edition and customize it. In order to properly separate the work, the customized part
of the edition has its own manifest.json file, that explicitly specifies which other editions are
required.
\begin{minted}{json}
{
"edition": "Custom",
"requires": [
"Base",
"Enable-Python"
]
}
\end{minted}
In this case, a "Base" edition and an "Enable-Python" edition must be provided when exporting
the Custom edition. The script will first process the "Base" configuration, then the "Enable-Python"
configuration and finally the "Custom" one. This allows an incremental workflow for creating editions.
Note that the \emph{-i} in command line options must be ordered, required editions appear first:
\begin{minted}{python}
python catalyze.py -r <paraview_sources> -i Path/to/Base -i Path/to/Enable-Python \
-i Path/to/Custom -o <Catalyst_source_dir>
\end{minted}
\subsection{Setting CMake Build Parameters}
By default, Catalyst will be built with the default ParaView build parameters (e.g. build with
shared libraries) unless one of the Catalyst editions changes that in its manifest.json file. An
......@@ -208,3 +235,27 @@ set_source_files_properties(
ABSTRACT
)
\end{minted}
\subsection{Exposing proxies}
To be available as a ParaView source, reader, filter or writer, a VTK class should be exposed through a Proxy.
This is done in XML files that described proxies and their properties, as explained in
\ref{subsection:cppPipeline}.
To extract new proxies from these decription files, they should be added under the
{\ttfamily "}proxies{\ttfamily "} keyword.
Below is an example for a filter and a source:
\begin{minted}{json}
"proxies":[
{
"path":"ParaViewCore/ServerManager/SMApplication/Resources/filters.xml",
"proxies":[
"Glyph"
]
},
{
"path":"ParaViewCore/ServerManager/SMApplication/Resources/sources.xml",
"proxies":[
"ArrowSource"
]
}
]
\end{minted}
......@@ -1582,7 +1582,7 @@ doxygen documentation web pages, we also recommend looking at the examples at
functioning example with a hard-coded VTK \Cplusplus pipeline is available in the
ParaView source code under the Examples/Catalyst/CxxVTKPipelineExample subdirectory.
\subsection{ParaView C++ Pipeline}
\subsection{ParaView C++ Pipeline}\label{subsection:cppPipeline}
As background, ParaView's server-manager is the code that controls the flow of
information and maintains state in ParaView's client-server architecture. It is
used by the client to set up the pipeline on the server, to set the parameters for
......
\section{Examples}
\subsection{Using Catalyst}
There are a wide variety of VTK examples at \url{www.vtk.org/Wiki/VTK/Examples}. This site
includes C, \Cplusplus, Fortran and Python examples but is targeted for general VTK development.
Examples specific to ParaView Catalyst can be found directly in the ParaView source code
under the Examples/Catalyst subdirectories. Descriptionts of these examples are listed below.
under the Examples/Catalyst subdirectories. Descriptions of these examples are listed below.
\begin{description}
\item[FortranPoissonSolver] \hfill \\
An example of a parallel, finite difference discretization of the Poisson equation
......@@ -70,3 +71,31 @@ under the Examples/Catalyst subdirectories. Descriptionts of these examples are
VTK data arrays to save on memory use by Catalyst. Note that this example
has been added to the ParaView source code in the ParaView 5.1.2 release.
\end{description}
\subsection{Creating an Edition}
Some Catalyst Editions are included in the ParaView source code, under the Catalyst/Editions directory.
They can be used directly, or be included in a custom edition, or be modified.
The official ParaView download page provides a section with different Catalyst source code.
These sources were extracted from ParaView using combinations of the following editions:
\begin{description}
\item[Base] \hfill \\
The base of all editions. Various CMake options are set to off in order to minimize dependencies,
such as \mbox{PARAVIEW\_BUILD\_QT\_GUI} and \mbox{PARAVIEW\_ENABLE\_PYTHON}.
If the core modules are extracted (as vtkPVClientServerCoreCore), there is only a few filters
(as the Append, AppendMolecule and AppendPolyData filters, needed to merge data from different MPI ranks).
\item[Enable-Python] \hfill \\
An edition to enable python wrapping. Necessary to use python pipelines.
\item[Essentials] \hfill \\
The main filters (including Clip and Contour). Note that it contains the PVTrivialProducer,
needed to add data in the pipeline. Requires Base.
\item[Extras] \hfill \\
Writers and more filters. Requires Essentials.
\item[Rendering-Base] \hfill \\
A good base to use rendering features. This edition enables screenshots,
and allows to use views and representations.
Requires Extras.
\item[Rendering-Base-Python] \hfill \\
The merge of Rendering-Base and Enable-Python: both are required. Add the PythonView.
\item[Rendering-Volume] \hfill \\
Volume Rendering capabilities. Requires Rendering-Base.
\end{description}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment