Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ParaView
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1,729
Issues
1,729
List
Boards
Labels
Service Desk
Milestones
Merge Requests
60
Merge Requests
60
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ParaView
ParaView
Commits
1151e96b
Commit
1151e96b
authored
Nov 05, 2010
by
Utkarsh Ayachit
⛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted more representations/views to use the new process module API.
parent
b590be7f
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
604 additions
and
675 deletions
+604
-675
Servers/Executables/pvtest.cxx
Servers/Executables/pvtest.cxx
+29
-17
Servers/Filters/vtkClientServerMoveData.cxx
Servers/Filters/vtkClientServerMoveData.cxx
+35
-21
Servers/Filters/vtkClientServerMoveData.h
Servers/Filters/vtkClientServerMoveData.h
+13
-11
Servers/Filters/vtkCompositeRepresentation.cxx
Servers/Filters/vtkCompositeRepresentation.cxx
+33
-0
Servers/Filters/vtkCompositeRepresentation.h
Servers/Filters/vtkCompositeRepresentation.h
+7
-0
Servers/Filters/vtkGeometryRepresentation.cxx
Servers/Filters/vtkGeometryRepresentation.cxx
+27
-0
Servers/Filters/vtkGeometryRepresentation.h
Servers/Filters/vtkGeometryRepresentation.h
+5
-0
Servers/Filters/vtkImageSliceDataDeliveryFilter.cxx
Servers/Filters/vtkImageSliceDataDeliveryFilter.cxx
+2
-36
Servers/Filters/vtkMPIMoveData.cxx
Servers/Filters/vtkMPIMoveData.cxx
+47
-3
Servers/Filters/vtkMPIMoveData.h
Servers/Filters/vtkMPIMoveData.h
+5
-0
Servers/Filters/vtkPVUpdateSuppressor.cxx
Servers/Filters/vtkPVUpdateSuppressor.cxx
+7
-7
Servers/Filters/vtkReductionFilter.cxx
Servers/Filters/vtkReductionFilter.cxx
+0
-1
Servers/Filters/vtkSelectionConverter.cxx
Servers/Filters/vtkSelectionConverter.cxx
+2
-2
Servers/Filters/vtkSpreadSheetView.cxx
Servers/Filters/vtkSpreadSheetView.cxx
+0
-2
Servers/Filters/vtkUnstructuredDataDeliveryFilter.cxx
Servers/Filters/vtkUnstructuredDataDeliveryFilter.cxx
+1
-40
Servers/ServerManager/CMakeLists.txt
Servers/ServerManager/CMakeLists.txt
+12
-12
Servers/ServerManager/Resources/views_and_representations.xml
...ers/ServerManager/Resources/views_and_representations.xml
+46
-36
Servers/ServerManager/vtkPMPVRepresentationProxy.cxx
Servers/ServerManager/vtkPMPVRepresentationProxy.cxx
+152
-0
Servers/ServerManager/vtkPMPVRepresentationProxy.h
Servers/ServerManager/vtkPMPVRepresentationProxy.h
+52
-0
Servers/ServerManager/vtkPMProxy.cxx
Servers/ServerManager/vtkPMProxy.cxx
+7
-7
Servers/ServerManager/vtkPMProxyProperty.cxx
Servers/ServerManager/vtkPMProxyProperty.cxx
+2
-2
Servers/ServerManager/vtkPMSelectionRepresentationProxy.cxx
Servers/ServerManager/vtkPMSelectionRepresentationProxy.cxx
+17
-19
Servers/ServerManager/vtkPMSelectionRepresentationProxy.h
Servers/ServerManager/vtkPMSelectionRepresentationProxy.h
+13
-14
Servers/ServerManager/vtkPMTextSourceRepresentationProxy.cxx
Servers/ServerManager/vtkPMTextSourceRepresentationProxy.cxx
+17
-18
Servers/ServerManager/vtkPMTextSourceRepresentationProxy.h
Servers/ServerManager/vtkPMTextSourceRepresentationProxy.h
+15
-15
Servers/ServerManager/vtkPMUniformGridVolumeRepresentationProxy.cxx
...rverManager/vtkPMUniformGridVolumeRepresentationProxy.cxx
+19
-19
Servers/ServerManager/vtkPMUniformGridVolumeRepresentationProxy.h
...ServerManager/vtkPMUniformGridVolumeRepresentationProxy.h
+15
-17
Servers/ServerManager/vtkSMChartRepresentationProxy.cxx
Servers/ServerManager/vtkSMChartRepresentationProxy.cxx
+8
-8
Servers/ServerManager/vtkSMChartRepresentationProxy.h
Servers/ServerManager/vtkSMChartRepresentationProxy.h
+2
-0
Servers/ServerManager/vtkSMPVRepresentationProxy.cxx
Servers/ServerManager/vtkSMPVRepresentationProxy.cxx
+1
-318
Servers/ServerManager/vtkSMPVRepresentationProxy.h
Servers/ServerManager/vtkSMPVRepresentationProxy.h
+0
-48
Servers/ServerManager/vtkSMProxy.cxx
Servers/ServerManager/vtkSMProxy.cxx
+6
-0
Servers/ServerManager/vtkSMProxyDefinitionManager.cxx
Servers/ServerManager/vtkSMProxyDefinitionManager.cxx
+1
-1
Servers/ServerManager/vtkSMSpreadSheetRepresentationProxy.cxx
...ers/ServerManager/vtkSMSpreadSheetRepresentationProxy.cxx
+2
-1
Servers/ServerManager/vtkSMSpreadSheetRepresentationProxy.h
Servers/ServerManager/vtkSMSpreadSheetRepresentationProxy.h
+2
-0
Servers/ServerManager/vtkSMUnstructuredGridVolumeRepresentationProxy.cxx
...anager/vtkSMUnstructuredGridVolumeRepresentationProxy.cxx
+2
-0
No files found.
Servers/Executables/pvtest.cxx
View file @
1151e96b
...
...
@@ -35,22 +35,15 @@ int main(int argc, char* argv[])
vtkPVServerOptions
*
options
=
vtkPVServerOptions
::
New
();
vtkInitializationHelper
::
Initialize
(
argc
,
argv
,
vtkProcessModule2
::
PROCESS_
BATCH
,
options
);
vtkProcessModule2
::
PROCESS_
CLIENT
,
options
);
//---------------------------------------------------------------------------
vtkSMSession
*
session
=
NULL
;
vtkSMProxy
*
proxy
=
NULL
;
if
(
options
->
GetUnknownArgument
())
{
// We have a remote URL to use
session
=
vtkSMSessionClient
::
New
();
vtkSMSessionClient
::
SafeDownCast
(
session
)
->
Connect
(
options
->
GetUnknownArgument
());
}
else
{
// We are in built-in mode
session
=
vtkSMSession
::
New
();
}
//session = vtkSMSessionClient::New();
//vtkSMSessionClient::SafeDownCast(session)->Connect("cs://localhost:11111");
session
=
vtkSMSession
::
New
();
cout
<<
"Starting..."
<<
endl
;
...
...
@@ -60,10 +53,29 @@ int main(int argc, char* argv[])
{
cout
<<
" Processing loop: "
<<
i
<<
endl
;
proxy
=
pxm
->
NewProxy
(
"views"
,
"RenderView"
);
proxy
->
UpdateVTKObjects
();
vtkSMRenderViewProxy
::
SafeDownCast
(
proxy
)
->
StillRender
();
proxy
->
Delete
();
vtkSMProxy
*
sphere
=
pxm
->
NewProxy
(
"sources"
,
"SphereSource"
);
vtkSMPropertyHelper
(
sphere
,
"PhiResolution"
).
Set
(
20
);
vtkSMPropertyHelper
(
sphere
,
"ThetaResolution"
).
Set
(
20
);
sphere
->
UpdateVTKObjects
();
vtkSMProxy
*
repr
=
pxm
->
NewProxy
(
"representations"
,
"GeometryRepresentation"
);
vtkSMPropertyHelper
(
repr
,
"Input"
).
Set
(
sphere
);
vtkSMPropertyHelper
(
repr
,
"Representation"
).
Set
(
"Wireframe"
);
repr
->
UpdateVTKObjects
();
vtkSMProxy
*
view
=
pxm
->
NewProxy
(
"views"
,
"RenderView"
);
vtkSMPropertyHelper
(
view
,
"Representations"
).
Add
(
repr
);
view
->
UpdateVTKObjects
();
vtkSMRenderViewProxy
::
SafeDownCast
(
view
)
->
StillRender
();
vtkSMRenderViewProxy
::
SafeDownCast
(
view
)
->
ResetCamera
();
vtkSMRenderViewProxy
::
SafeDownCast
(
view
)
->
StillRender
();
view
->
Delete
();
sphere
->
Delete
();
repr
->
Delete
();
proxy
=
pxm
->
NewProxy
(
"misc"
,
"FileInformationHelper"
);
vtkSMPropertyHelper
(
proxy
,
"Path"
).
Set
(
"/tmp"
);
...
...
@@ -76,7 +88,7 @@ int main(int argc, char* argv[])
info
->
Delete
();
proxy
->
Delete
();
proxy
=
pxm
->
NewProxy
(
"sources"
,
"SphereSource"
);
vtkSMProxy
*
proxy
=
pxm
->
NewProxy
(
"sources"
,
"SphereSource"
);
vtkSMPropertyHelper
(
proxy
,
"PhiResolution"
).
Set
(
20
);
vtkSMPropertyHelper
(
proxy
,
"ThetaResolution"
).
Set
(
20
);
proxy
->
UpdateVTKObjects
();
...
...
Servers/Filters/vtkClientServerMoveData.cxx
View file @
1151e96b
...
...
@@ -15,7 +15,6 @@
#include "vtkClientServerMoveData.h"
#include "vtkCharArray.h"
#include "vtkClientConnection.h"
#include "vtkDataObject.h"
#include "vtkDataObjectTypes.h"
#include "vtkGenericDataObjectReader.h"
...
...
@@ -23,26 +22,24 @@
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkMultiProcessController.h"
#include "vtkObjectFactory.h"
#include "vtkPolyData.h"
#include "vtkProcessModule.h"
#include "vtkProcessModule2.h"
#include "vtkPVSession.h"
#include "vtkSelection.h"
#include "vtkSelectionSerializer.h"
#include "vtkServerConnection.h"
#include "vtkSocketController.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkUnstructuredGrid.h"
#include <vtksys/ios/sstream>
vtkStandardNewMacro
(
vtkClientServerMoveData
);
vtkCxxSetObjectMacro
(
vtkClientServerMoveData
,
ProcessModuleConnection
,
vtkProcessModuleConnection
);
vtkCxxSetObjectMacro
(
vtkClientServerMoveData
,
Controller
,
vtkMultiProcessController
);
//-----------------------------------------------------------------------------
vtkClientServerMoveData
::
vtkClientServerMoveData
()
{
this
->
ProcessModuleConnection
=
0
;
this
->
OutputDataType
=
VTK_POLY_DATA
;
this
->
WholeExtent
[
0
]
=
0
;
this
->
WholeExtent
[
1
]
=
-
1
;
...
...
@@ -50,13 +47,14 @@ vtkClientServerMoveData::vtkClientServerMoveData()
this
->
WholeExtent
[
3
]
=
-
1
;
this
->
WholeExtent
[
4
]
=
0
;
this
->
WholeExtent
[
5
]
=
-
1
;
this
->
Controller
=
0
;
this
->
ProcessType
=
AUTO
;
}
//-----------------------------------------------------------------------------
vtkClientServerMoveData
::~
vtkClientServerMoveData
()
{
this
->
Set
ProcessModuleConnection
(
0
);
this
->
Set
Controller
(
NULL
);
}
//-----------------------------------------------------------------------------
...
...
@@ -133,23 +131,40 @@ int vtkClientServerMoveData::RequestData(vtkInformation*,
vtkDataObject
::
DATA_OBJECT
());
}
vtk
RemoteConnection
*
rc
=
vtkRemoteConnection
::
SafeDownCast
(
this
->
ProcessModuleConnection
)
;
if
(
!
rc
)
vtk
MultiProcessController
*
controller
=
this
->
Controller
;
int
processType
=
this
->
ProcessType
;
if
(
this
->
ProcessType
==
AUTO
)
{
rc
=
vtkProcessModule
::
GetProcessModule
()
->
GetActiveRemoteConnection
();
vtkPVSession
*
session
=
vtkPVSession
::
SafeDownCast
(
vtkProcessModule2
::
GetProcessModule
()
->
GetActiveSession
());
if
(
!
session
)
{
vtkErrorMacro
(
"No active ParaView session"
);
return
0
;
}
if
(
vtkProcessModule2
::
GetProcessType
()
==
vtkProcessModule2
::
PROCESS_CLIENT
)
{
controller
=
session
->
GetController
(
vtkPVSession
::
DATA_SERVER
);
processType
=
CLIENT
;
}
else
{
controller
=
session
->
GetController
(
vtkPVSession
::
CLIENT
);
processType
=
SERVER
;
}
}
if
(
rc
)
if
(
controller
)
{
vtkSocketController
*
controller
=
rc
->
GetSocketController
();
bool
is_server
=
this
->
ProcessType
==
SERVER
;
bool
is_client
=
this
->
ProcessType
==
CLIENT
;
if
(
is_server
||
rc
->
IsA
(
"vtkClientConnection"
)
)
if
(
is_server
)
{
vtkDebugMacro
(
"Server Root: Send input data to client."
);
return
this
->
SendData
(
input
,
controller
);
}
else
if
(
is_client
||
rc
->
IsA
(
"vtkServerConnection"
)
)
else
if
(
is_client
)
{
vtkDebugMacro
(
"Client: Get data from server and put it on the output."
);
// This is a client node.
...
...
@@ -182,7 +197,7 @@ int vtkClientServerMoveData::RequestData(vtkInformation*,
//-----------------------------------------------------------------------------
int
vtkClientServerMoveData
::
SendData
(
vtkDataObject
*
input
,
vtk
Socket
Controller
*
controller
)
vtk
MultiProcess
Controller
*
controller
)
{
// This is a server root node.
// If it is a selection, use the XML serializer.
...
...
@@ -208,7 +223,7 @@ int vtkClientServerMoveData::SendData(vtkDataObject* input,
}
//-----------------------------------------------------------------------------
vtkDataObject
*
vtkClientServerMoveData
::
ReceiveData
(
vtk
Socket
Controller
*
controller
)
vtkDataObject
*
vtkClientServerMoveData
::
ReceiveData
(
vtk
MultiProcess
Controller
*
controller
)
{
vtkDataObject
*
data
=
NULL
;
if
(
this
->
OutputDataType
==
VTK_SELECTION
)
...
...
@@ -241,8 +256,6 @@ vtkDataObject* vtkClientServerMoveData::ReceiveData(vtkSocketController* control
void
vtkClientServerMoveData
::
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
)
{
this
->
Superclass
::
PrintSelf
(
os
,
indent
);
os
<<
indent
<<
"ProcessModuleConnection: "
<<
this
->
ProcessModuleConnection
<<
endl
;
os
<<
indent
<<
"WholeExtent: "
<<
this
->
WholeExtent
[
0
]
<<
", "
<<
this
->
WholeExtent
[
1
]
<<
", "
...
...
@@ -252,4 +265,5 @@ void vtkClientServerMoveData::PrintSelf(ostream& os, vtkIndent indent)
<<
this
->
WholeExtent
[
5
]
<<
endl
;
os
<<
indent
<<
"OutputDataType: "
<<
this
->
OutputDataType
<<
endl
;
os
<<
indent
<<
"ProcessType: "
<<
this
->
ProcessType
<<
endl
;
os
<<
indent
<<
"Controller: "
<<
this
->
Controller
<<
endl
;
}
Servers/Filters/vtkClientServerMoveData.h
View file @
1151e96b
...
...
@@ -25,8 +25,8 @@
#include "vtkDataObjectAlgorithm.h"
class
vtk
ProcessModuleConnection
;
class
vtk
Socket
Controller
;
class
vtk
MultiProcessController
;
class
vtk
MultiProcess
Controller
;
class
VTK_EXPORT
vtkClientServerMoveData
:
public
vtkDataObjectAlgorithm
{
...
...
@@ -35,10 +35,6 @@ public:
vtkTypeMacro
(
vtkClientServerMoveData
,
vtkDataObjectAlgorithm
);
void
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
);
// Set the connection on which we are moving the data.
// If not set, the active remote connection will be used.
void
SetProcessModuleConnection
(
vtkProcessModuleConnection
*
);
// Description:
// Controls the output type. This is required because processes receiving
// data cannot know their output type in RequestDataObject without
...
...
@@ -59,12 +55,19 @@ public:
// output type. Make sure to call this before any pipeline updates occur.
vtkSetVector6Macro
(
WholeExtent
,
int
);
vtkGetVector6Macro
(
WholeExtent
,
int
);
// Description:
// Optionally, set the process type. If set to AUTO, then the process type is
// tried to be determined using the active connection.
vtkSetMacro
(
ProcessType
,
int
);
vtkGetMacro
(
ProcessType
,
int
);
// Description:
// Get/Set the controller to use. This is optional and needed only when
// ProcessType is set to something other than AUTO. If AUTO, then the
// controller is obtained from the active session.
void
SetController
(
vtkMultiProcessController
*
);
vtkGetObjectMacro
(
Controller
,
vtkMultiProcessController
);
//BTX
enum
ProcessTypes
{
...
...
@@ -96,11 +99,9 @@ protected:
vtkInformationVector
**
inputVector
,
vtkInformationVector
*
outputVector
);
virtual
int
SendData
(
vtkDataObject
*
,
vtkSocketController
*
);
virtual
vtkDataObject
*
ReceiveData
(
vtkSocketController
*
);
virtual
int
SendData
(
vtkDataObject
*
,
vtkMultiProcessController
*
);
virtual
vtkDataObject
*
ReceiveData
(
vtkMultiProcessController
*
);
vtkProcessModuleConnection
*
ProcessModuleConnection
;
enum
Tags
{
TRANSMIT_DATA_OBJECT
=
23483
};
...
...
@@ -108,6 +109,7 @@ protected:
int
OutputDataType
;
int
WholeExtent
[
6
];
int
ProcessType
;
vtkMultiProcessController
*
Controller
;
private:
vtkClientServerMoveData
(
const
vtkClientServerMoveData
&
);
// Not implemented.
...
...
Servers/Filters/vtkCompositeRepresentation.cxx
View file @
1151e96b
...
...
@@ -19,6 +19,7 @@
#include "vtkMemberFunctionCommand.h"
#include "vtkObjectFactory.h"
#include "vtkSmartPointer.h"
#include "vtkStringArray.h"
#include "vtkView.h"
#include "vtkWeakPointer.h"
...
...
@@ -37,6 +38,7 @@ public:
vtkstd
::
string
ActiveRepresentationKey
;
vtkWeakPointer
<
vtkView
>
View
;
vtkSmartPointer
<
vtkStringArray
>
RepresentationTypes
;
};
vtkStandardNewMacro
(
vtkCompositeRepresentation
);
...
...
@@ -44,6 +46,8 @@ vtkStandardNewMacro(vtkCompositeRepresentation);
vtkCompositeRepresentation
::
vtkCompositeRepresentation
()
{
this
->
Internals
=
new
vtkInternals
();
this
->
Internals
->
RepresentationTypes
=
vtkSmartPointer
<
vtkStringArray
>::
New
();
this
->
Internals
->
RepresentationTypes
->
SetNumberOfComponents
(
1
);
this
->
Observer
=
vtkMakeMemberFunctionCommand
(
*
this
,
&
vtkCompositeRepresentation
::
TriggerUpdateDataEvent
);
}
...
...
@@ -116,6 +120,35 @@ void vtkCompositeRepresentation::RemoveRepresentation(
}
}
//----------------------------------------------------------------------------
vtkStringArray
*
vtkCompositeRepresentation
::
GetRepresentationTypes
()
{
this
->
Internals
->
RepresentationTypes
->
SetNumberOfTuples
(
static_cast
<
vtkIdType
>
(
this
->
Internals
->
Representations
.
size
()));
vtkIdType
cc
=
0
;
vtkInternals
::
RepresentationMap
::
iterator
iter
;
for
(
iter
=
this
->
Internals
->
Representations
.
begin
();
iter
!=
this
->
Internals
->
Representations
.
end
();
++
iter
,
++
cc
)
{
this
->
Internals
->
RepresentationTypes
->
SetValue
(
cc
,
iter
->
first
.
c_str
());
}
return
this
->
Internals
->
RepresentationTypes
;
}
//----------------------------------------------------------------------------
const
char
*
vtkCompositeRepresentation
::
GetActiveRepresentationKey
()
{
vtkInternals
::
RepresentationMap
::
iterator
iter
=
this
->
Internals
->
Representations
.
find
(
this
->
Internals
->
ActiveRepresentationKey
);
if
(
iter
!=
this
->
Internals
->
Representations
.
end
())
{
return
this
->
Internals
->
ActiveRepresentationKey
.
c_str
();
}
return
NULL
;
}
//----------------------------------------------------------------------------
vtkPVDataRepresentation
*
vtkCompositeRepresentation
::
GetActiveRepresentation
()
{
...
...
Servers/Filters/vtkCompositeRepresentation.h
View file @
1151e96b
...
...
@@ -31,6 +31,8 @@
#include "vtkPVDataRepresentation.h"
class
vtkStringArray
;
class
VTK_EXPORT
vtkCompositeRepresentation
:
public
vtkPVDataRepresentation
{
public:
...
...
@@ -55,6 +57,7 @@ public:
// Set the active key. If a valid key is not specified, then none of the
// representations is treated as active.
void
SetActiveRepresentation
(
const
char
*
key
);
const
char
*
GetActiveRepresentationKey
();
// Description:
// Returns the active representation if valid.
...
...
@@ -94,6 +97,10 @@ public:
// Bring this algorithm's outputs up-to-date.
virtual
void
Update
();
// Description:
// Returns the list of available representation types as a string array.
vtkStringArray
*
GetRepresentationTypes
();
//BTX
protected:
vtkCompositeRepresentation
();
...
...
Servers/Filters/vtkGeometryRepresentation.cxx
View file @
1151e96b
...
...
@@ -37,6 +37,8 @@
#include "vtkShadowMapBakerPass.h"
#include "vtkUnstructuredDataDeliveryFilter.h"
#include <vtksys/SystemTools.hxx>
//*****************************************************************************
class
vtkGeometryRepresentationMultiBlockMaker
:
public
vtkMultiBlockDataSetAlgorithm
{
...
...
@@ -340,6 +342,31 @@ bool vtkGeometryRepresentation::RemoveFromView(vtkView* view)
return
false
;
}
//----------------------------------------------------------------------------
void
vtkGeometryRepresentation
::
SetRepresentation
(
const
char
*
type
)
{
if
(
vtksys
::
SystemTools
::
Strucmp
(
type
,
"Points"
)
==
0
)
{
this
->
SetRepresentation
(
POINTS
);
}
else
if
(
vtksys
::
SystemTools
::
Strucmp
(
type
,
"Wireframe"
)
==
0
)
{
this
->
SetRepresentation
(
WIREFRAME
);
}
else
if
(
vtksys
::
SystemTools
::
Strucmp
(
type
,
"Surface"
)
==
0
)
{
this
->
SetRepresentation
(
SURFACE
);
}
else
if
(
vtksys
::
SystemTools
::
Strucmp
(
type
,
"Surface With Edges"
)
==
0
)
{
this
->
SetRepresentation
(
SURFACE_WITH_EDGES
);
}
else
{
vtkErrorMacro
(
"Invalid type: "
<<
type
);
}
}
//----------------------------------------------------------------------------
void
vtkGeometryRepresentation
::
UpdateColoringParameters
()
{
...
...
Servers/Filters/vtkGeometryRepresentation.h
View file @
1151e96b
...
...
@@ -113,6 +113,11 @@ public:
vtkSetClampMacro
(
Representation
,
int
,
POINTS
,
SURFACE_WITH_EDGES
);
vtkGetMacro
(
Representation
,
int
);
// Description:
// Overload to set representation type using string. Accepted strings are:
// "Points", "Wireframe", "Surface" and "Surface With Edges".
virtual
void
SetRepresentation
(
const
char
*
);
// Description:
// Returns the data object that is rendered from the given input port.
virtual
vtkDataObject
*
GetRenderedDataObject
(
int
port
);
...
...
Servers/Filters/vtkImageSliceDataDeliveryFilter.cxx
View file @
1151e96b
...
...
@@ -18,10 +18,10 @@
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkMPIMoveData.h"
#include "vtkMPIMoveData.h"
#include "vtkMPIMToNSocketConnection.h"
#include "vtkMultiProcessController.h"
#include "vtkObjectFactory.h"
#include "vtkProcessModule.h"
#include "vtkPVOptions.h"
#include "vtkPVRenderView.h"
#include "vtkSmartPointer.h"
...
...
@@ -49,41 +49,7 @@ vtkImageSliceDataDeliveryFilter::~vtkImageSliceDataDeliveryFilter()
//----------------------------------------------------------------------------
void
vtkImageSliceDataDeliveryFilter
::
InitializeForCommunication
()
{
vtkProcessModule
*
pm
=
vtkProcessModule
::
GetProcessModule
();
if
(
pm
==
NULL
)
{
vtkWarningMacro
(
"No process module found."
);
return
;
}
int
process_type
=
pm
->
GetOptions
()
->
GetProcessType
();
switch
(
process_type
)
{
case
vtkPVOptions
::
PVSERVER
:
case
vtkPVOptions
::
PVDATA_SERVER
:
this
->
MoveData
->
SetServerToDataServer
();
break
;
case
vtkPVOptions
::
PVRENDER_SERVER
:
this
->
MoveData
->
SetServerToRenderServer
();
break
;
default:
if
(
pm
->
GetPartitionId
()
>
0
)
{
this
->
MoveData
->
SetServerToDataServer
();
}
else
{
this
->
MoveData
->
SetServerToClient
();
}
}
vtkMPIMToNSocketConnection
*
render_server_data_server_connector
=
vtkMPIMToNSocketConnection
::
SafeDownCast
(
pm
->
GetObjectFromID
(
pm
->
GetMPIMToNSocketConnectionID
(),
true
));
this
->
MoveData
->
SetMPIMToNSocketConnection
(
render_server_data_server_connector
);
this
->
MoveData
->
SetController
(
pm
->
GetController
());
this
->
MoveData
->
InitializeForCommunicationForParaView
();
}
//----------------------------------------------------------------------------
...
...
Servers/Filters/vtkMPIMoveData.cxx
View file @
1151e96b
...
...
@@ -21,9 +21,9 @@
#include "vtkCharArray.h"
#include "vtkCompositeDataSet.h"
#include "vtkDataSetReader.h"
#include "vtkGenericDataObjectWriter.h"
#include "vtkGenericDataObjectReader.h"
#include "vtkDirectedGraph.h"
#include "vtkGenericDataObjectReader.h"
#include "vtkGenericDataObjectWriter.h"
#include "vtkGraphReader.h"
#include "vtkGraphWriter.h"
#include "vtkImageAppend.h"
...
...
@@ -38,7 +38,8 @@
#include "vtkOutlineFilter.h"
#include "vtkPointData.h"
#include "vtkPolyData.h"
#include "vtkProcessModule.h"
#include "vtkProcessModule2.h"
#include "vtkPVSession.h"
#include "vtkSmartPointer.h"
#include "vtkSocketCommunicator.h"
#include "vtkSocketController.h"
...
...
@@ -199,6 +200,49 @@ vtkMPIMoveData::~vtkMPIMoveData()
this
->
ClearBuffer
();
}
//----------------------------------------------------------------------------
void
vtkMPIMoveData
::
InitializeForCommunicationForParaView
()
{
vtkProcessModule2
*
pm
=
vtkProcessModule2
::
GetProcessModule
();
if
(
pm
==
NULL
)
{
vtkWarningMacro
(
"No process module found."
);
return
;
}
vtkPVSession
*
session
=
vtkPVSession
::
SafeDownCast
(
pm
->
GetActiveSession
());
if
(
!
session
)
{
vtkWarningMacro
(
"No active vtkPVSession found."
);
return
;
}
int
processRoles
=
session
->
GetProcessRoles
();
if
(
processRoles
&
vtkPVSession
::
RENDER_SERVER
)
{
this
->
SetServerToRenderServer
();
}
if
(
processRoles
&
vtkPVSession
::
DATA_SERVER
)
{
this
->
SetServerToDataServer
();
this
->
SetClientDataServerSocketController
(
session
->
GetController
(
vtkPVSession
::
CLIENT
));
}
if
(
processRoles
&
vtkPVSession
::
CLIENT
)
{
this
->
SetServerToClient
();
this
->
SetClientDataServerSocketController
(
session
->
GetController
(
vtkPVSession
::
DATA_SERVER
));
}
this
->
SetController
(
pm
->
GetGlobalController
());
this
->
SetMPIMToNSocketConnection
(
session
->
GetMPIMToNSocketConnection
());
}
//----------------------------------------------------------------------------
void
vtkMPIMoveData
::
SetUseZLibCompression
(
bool
b
)
{
...
...
Servers/Filters/vtkMPIMoveData.h
View file @
1151e96b
...
...
@@ -36,6 +36,11 @@ public:
vtkTypeMacro
(
vtkMPIMoveData
,
vtkPassInputTypeAlgorithm
);
void
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
);
// Description:
// Use this method to initialize all communicators/sockets using ParaView
// defaults.
virtual
void
InitializeForCommunicationForParaView
();
// Description:
// Objects for communication.
// The controller is an MPI controller used to communicate
...
...
Servers/Filters/vtkPVUpdateSuppressor.cxx
View file @
1151e96b
...
...
@@ -20,13 +20,13 @@
#include "vtkCompositeDataPipeline.h"
#include "vtkDataObject.h"
#include "vtkDemandDrivenPipeline.h"
#include "vtkInformation.h"
#include "vtkInformationDoubleVectorKey.h"
#include "vtkInformationExecutivePortKey.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkMultiProcessController.h"
#include "vtkObjectFactory.h"
#include "vtkPolyData.h"
#include "vtkProcessModule.h"
#include "vtkSmartPointer.h"
#include "vtkUnstructuredGrid.h"
#include "vtkUpdateSuppressorPipeline.h"
...
...
@@ -53,12 +53,12 @@ vtkPVUpdateSuppressor::vtkPVUpdateSuppressor()
this
->
Enabled
=
1
;
vtk
ProcessModule
*
pm
=
vtkProcessModule
::
GetProcessModule
();
if
(
pm
)
vtk
MultiProcessController
*
controller
=
vtkMultiProcessController
::
GetGlobalController
();
if
(
controller
)
{
this
->
UpdateNumberOfPieces
=
pm
->
GetNumberOfLocalPartition
s
();
this
->
UpdatePiece
=
pm
->
GetPartition
Id
();
this
->
UpdateNumberOfPieces
=
controller
->
GetNumberOfProcesse
s
();
this
->
UpdatePiece
=
controller
->
GetLocalProcess
Id
();
}
}
...
...
Servers/Filters/vtkReductionFilter.cxx
View file @
1151e96b
...
...
@@ -27,7 +27,6 @@
#include "vtkInstantiator.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkProcessModule.h"
#include "vtkRectilinearGrid.h"
#include "vtkRemoteConnection.h"
#include "vtkSmartPointer.h"
...
...
Servers/Filters/vtkSelectionConverter.cxx
View file @
1151e96b
...
...
@@ -24,7 +24,7 @@
#include "vtkInformation.h"
#include "vtkObjectFactory.h"
#include "vtkPointData.h"
#include "vtkProcessModule.h"
#include "vtkProcessModule
2
.h"
#include "vtkPVGeometryFilter.h"
#include "vtkSelection.h"
#include "vtkSelectionNode.h"
...
...
@@ -109,7 +109,7 @@ void vtkSelectionConverter::Convert(vtkSelection* input, vtkSelection* output,
vtkInformation
*
nodeProps
=
input
->
GetNode
(
i
)
->
GetProperties
();
if
(
!
nodeProps
->
Has
(
vtkSelectionNode
::
PROCESS_ID
())
||