Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ben Boeckel
Xdmf
Commits
4f0860ff
Commit
4f0860ff
authored
Apr 16, 2003
by
Charles Law
Browse files
Works with paraview's batch mode now.
parent
000a4b08
Changes
2
Show whitespace changes
Inline
Side-by-side
vtk/vtkXdmfReader.cxx
View file @
4f0860ff
...
...
@@ -69,7 +69,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
vtkStandardNewMacro
(
vtkXdmfReader
);
vtkCxxRevisionMacro
(
vtkXdmfReader
,
"1.
5
"
);
vtkCxxRevisionMacro
(
vtkXdmfReader
,
"1.
6
"
);
#if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__))
# include <direct.h>
...
...
@@ -96,7 +96,10 @@ vtkXdmfReader::vtkXdmfReader()
{
this
->
Internals
=
new
vtkXdmfReaderInternal
;
// I have this flag because I do not want to change the initialization
// of the output to the generic output. It might break something;
this
->
SetOutput
(
vtkDataObject
::
New
());
this
->
OutputsInitialized
=
0
;
// Releasing data for pipeline parallism.
// Filters will know it is empty.
this
->
Outputs
[
0
]
->
ReleaseData
();
...
...
@@ -164,6 +167,10 @@ vtkXdmfReader::~vtkXdmfReader()
vtkDataSet
*
vtkXdmfReader
::
GetOutput
()
{
if
(
!
this
->
OutputsInitialized
)
{
this
->
ExecuteInformation
();
}
if
(
this
->
NumberOfOutputs
<
1
)
{
return
NULL
;
...
...
@@ -172,18 +179,27 @@ vtkDataSet *vtkXdmfReader::GetOutput()
return
static_cast
<
vtkDataSet
*>
(
this
->
Outputs
[
0
]);
}
//----------------------------------------------------------------------------
void
vtkXdmfReader
::
SetOutput
(
vtkDataSet
*
output
)
{
this
->
OutputsInitialized
=
1
;
this
->
vtkSource
::
SetNthOutput
(
0
,
output
);
}
//----------------------------------------------------------------------------
void
vtkXdmfReader
::
SetOutput
(
vtkDataObject
*
output
)
{
this
->
OutputsInitialized
=
1
;
this
->
vtkSource
::
SetNthOutput
(
0
,
output
);
}
//----------------------------------------------------------------------------
vtkDataSet
*
vtkXdmfReader
::
GetOutput
(
int
idx
)
{
if
(
!
this
->
OutputsInitialized
)
{
this
->
ExecuteInformation
();
}
return
static_cast
<
vtkDataSet
*>
(
this
->
Superclass
::
GetOutput
(
idx
)
);
}
...
...
@@ -863,6 +879,9 @@ void vtkXdmfReader::ExecuteInformation()
int
type_changed
=
0
;
if
(
vGrid
)
{
// Put this here so that GetOutput
// does not call ExecuteInfomrtion again.
this
->
OutputsInitialized
=
1
;
if
(
this
->
GetOutput
()
->
GetClassName
()
!=
vGrid
->
GetClassName
()
)
{
type_changed
=
1
;
...
...
vtk/vtkXdmfReader.h
View file @
4f0860ff
...
...
@@ -192,6 +192,7 @@ protected:
vtkXdmfReaderInternal
*
Internals
;
int
Stride
[
3
];
int
OutputsInitialized
;
private:
vtkXdmfReader
(
const
vtkXdmfReader
&
);
// Not implemented
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment