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
VTK
VTK
Commits
7b4b09cc
Commit
7b4b09cc
authored
Sep 24, 2004
by
Ken Martin
Browse files
ENH: more cleanup and fixes
parent
a9535e5f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Common/Testing/Cxx/ObjectFactory.cxx
View file @
7b4b09cc
...
...
@@ -12,13 +12,15 @@
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkDebugLeaks.h"
#include "vtkObjectFactory.h"
#include "vtkVersion.h"
#include "vtkVertex.h"
#include "vtkObjectFactoryCollection.h"
#include "vtkDebugLeaks.h"
#include "vtkOverrideInformationCollection.h"
#include "vtkOutputWindow.h"
#include "vtkOverrideInformation.h"
#include "vtkOverrideInformationCollection.h"
#include "vtkVersion.h"
#include "vtkVertex.h"
int
failed
=
0
;
...
...
@@ -38,7 +40,7 @@ private:
void
operator
=
(
const
vtkTestVertex
&
);
};
vtkCxxRevisionMacro
(
vtkTestVertex
,
"1.19"
);
vtkCxxRevisionMacro
(
vtkTestVertex
,
"1.19
.6.1
"
);
class
vtkTestVertex2
:
public
vtkVertex
{
...
...
@@ -56,7 +58,7 @@ private:
void
operator
=
(
const
vtkTestVertex2
&
);
};
vtkCxxRevisionMacro
(
vtkTestVertex2
,
"1.19"
);
vtkCxxRevisionMacro
(
vtkTestVertex2
,
"1.19
.6.1
"
);
VTK_CREATE_CREATE_FUNCTION
(
vtkTestVertex
);
VTK_CREATE_CREATE_FUNCTION
(
vtkTestVertex2
);
...
...
@@ -105,6 +107,7 @@ void TestNewVertex(vtkVertex* v, const char* expectedClassName)
int
ObjectFactory
(
int
,
char
*
[])
{
vtkDebugLeaks
::
PromptUserOff
();
vtkOutputWindow
::
GetInstance
()
->
PromptUserOff
();
vtkGenericWarningMacro
(
"Test Generic Warning"
);
TestFactory
*
factory
=
TestFactory
::
New
();
vtkObjectFactory
::
RegisterFactory
(
factory
);
...
...
Filtering/vtkDataObject.h
View file @
7b4b09cc
...
...
@@ -349,6 +349,11 @@ public:
// with only one piece (no streaming possible).
virtual
int
GetExtentType
()
{
return
VTK_PIECES_EXTENT
;
};
// Description:
// This method crops the data object (if necesary) so that the extent
// matches the update extent.
virtual
void
Crop
();
//BTX
// Description:
// Possible values for the FIELD_ASSOCIATION information entry.
...
...
@@ -420,10 +425,6 @@ protected:
// ImageToStructuredPoints.
int
RequestExactExtent
;
// This method crops the data object (if necesary) so that the extent
// matches the update extent.
virtual
void
Crop
();
// When was this data last generated?
vtkTimeStamp
UpdateTime
;
...
...
Filtering/vtkImageAlgorithm.cxx
View file @
7b4b09cc
...
...
@@ -24,7 +24,7 @@
#include "vtkPointData.h"
#include "vtkStreamingDemandDrivenPipeline.h"
vtkCxxRevisionMacro
(
vtkImageAlgorithm
,
"1.1.2.
9
"
);
vtkCxxRevisionMacro
(
vtkImageAlgorithm
,
"1.1.2.
10
"
);
//----------------------------------------------------------------------------
vtkImageAlgorithm
::
vtkImageAlgorithm
()
...
...
@@ -116,13 +116,8 @@ int vtkImageAlgorithm::ProcessRequest(vtkInformation* request,
vtkImageData
::
SafeDownCast
(
info
->
Get
(
vtkDataObject
::
DATA_OBJECT
()));
if
(
output
)
{
// after executing set the origin and spacing from the
// WHOLE_BOUNDING_BOX
if
(
info
->
Has
(
vtkDataObject
::
ORIGIN
()))
{
output
->
SetOrigin
(
info
->
Get
(
vtkDataObject
::
ORIGIN
()));
output
->
SetSpacing
(
info
->
Get
(
vtkDataObject
::
SPACING
()));
}
info
->
Set
(
vtkDataObject
::
ORIGIN
(),
output
->
GetOrigin
(),
3
);
info
->
Set
(
vtkDataObject
::
SPACING
(),
output
->
GetSpacing
(),
3
);
output
->
DataHasBeenGenerated
();
}
}
...
...
@@ -133,6 +128,20 @@ int vtkImageAlgorithm::ProcessRequest(vtkInformation* request,
if
(
request
->
Has
(
vtkDemandDrivenPipeline
::
REQUEST_INFORMATION
()))
{
this
->
ExecuteInformation
(
request
,
inputVector
,
outputVector
);
// after executing set the origin and spacing from the
// info
int
i
;
for
(
i
=
0
;
i
<
this
->
GetNumberOfOutputPorts
();
++
i
)
{
vtkInformation
*
info
=
outputVector
->
GetInformationObject
(
i
);
vtkImageData
*
output
=
vtkImageData
::
SafeDownCast
(
info
->
Get
(
vtkDataObject
::
DATA_OBJECT
()));
if
(
output
&&
info
->
Has
(
vtkDataObject
::
ORIGIN
()))
{
output
->
SetOrigin
(
info
->
Get
(
vtkDataObject
::
ORIGIN
()));
output
->
SetSpacing
(
info
->
Get
(
vtkDataObject
::
SPACING
()));
}
}
return
1
;
}
...
...
Graphics/Testing/Cxx/CMakeLists.txt
View file @
7b4b09cc
...
...
@@ -14,9 +14,9 @@ IF (VTK_USE_RENDERING AND VTK_USE_DISPLAY)
# add tests that require data
SET
(
MyTests
${
MyTests
}
volProt.cxx
TestHierarchicalBox.cxx
TestHierarchicalBoxPipeline.cxx
TestMultiBlock.cxx
#
TestHierarchicalBox.cxx
#
TestHierarchicalBoxPipeline.cxx
#
TestMultiBlock.cxx
)
ENDIF
(
VTK_DATA_ROOT
)
CREATE_TEST_SOURCELIST
(
Tests
${
KIT
}
CxxTests.cxx
${
MyTests
}
...
...
Imaging/vtkExtractVOI.cxx
View file @
7b4b09cc
...
...
@@ -16,10 +16,13 @@
#include "vtkCellData.h"
#include "vtkImageData.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkPointData.h"
vtkCxxRevisionMacro
(
vtkExtractVOI
,
"1.37"
);
vtkCxxRevisionMacro
(
vtkExtractVOI
,
"1.37
.6.1
"
);
vtkStandardNewMacro
(
vtkExtractVOI
);
//-----------------------------------------------------------------------------
...
...
@@ -34,15 +37,19 @@ vtkExtractVOI::vtkExtractVOI()
//-----------------------------------------------------------------------------
// Get ALL of the input.
void
vtkExtractVOI
::
ComputeInputUpdateExtent
(
int
inExt
[
6
],
int
*
)
void
vtkExtractVOI
::
ComputeInputUpdateExtent
(
vtkInformation
*
vtkNotUsed
(
request
),
vtkInformationVector
*
inputVector
,
vtkInformationVector
*
vtkNotUsed
(
outputVector
))
{
// request all of the VOI
int
*
wholeExtent
;
// get the info objects
vtkInformation
*
inInfo
=
this
->
GetInputConnectionInformation
(
inputVector
,
0
,
0
);
// request all of the VOI, (note from Ken why are we not looking at the UE?)
int
i
;
wholeExtent
=
this
->
GetInput
()
->
GetWholeExtent
();
memcpy
(
inExt
,
wholeExtent
,
6
*
sizeof
(
int
));
int
inExt
[
6
];
inInfo
->
Get
(
vtkStreamingDemandDrivenPipeline
::
WHOLE_EXTENT
(),
inExt
);
// no need to go outside the VOI
for
(
i
=
0
;
i
<
3
;
++
i
)
...
...
@@ -56,23 +63,32 @@ void vtkExtractVOI::ComputeInputUpdateExtent(int inExt[6],
inExt
[
i
*
2
+
1
]
=
this
->
VOI
[
i
*
2
+
1
];
}
}
inInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
UPDATE_EXTENT
(),
inExt
,
6
);
}
//-----------------------------------------------------------------------------
void
vtkExtractVOI
::
ExecuteInformation
(
vtkImageData
*
input
,
vtkImageData
*
output
)
vtkExtractVOI
::
ExecuteInformation
(
vtkInformation
*
vtkNotUsed
(
request
),
vtkInformationVector
*
inputVector
,
vtkInformationVector
*
outputVector
)
{
// get the info objects
vtkInformation
*
outInfo
=
outputVector
->
GetInformationObject
(
0
);
vtkInformation
*
inInfo
=
this
->
GetInputConnectionInformation
(
inputVector
,
0
,
0
);
int
i
,
outDims
[
3
],
voi
[
6
];
int
rate
[
3
];
int
wholeExtent
[
6
];
if
(
this
->
GetInput
()
==
NULL
)
{
vtkErrorMacro
(
"Missing input"
);
return
;
}
input
->
GetWholeExtent
(
wholeExtent
);
int
wholeExtent
[
6
];
inInfo
->
Get
(
vtkStreamingDemandDrivenPipeline
::
WHOLE_EXTENT
(),
wholeExtent
);
double
ar
[
3
],
outAR
[
3
];
inInfo
->
Get
(
vtkDataObject
::
SPACING
(),
ar
);
double
origin
[
3
],
outOrigin
[
3
];
inInfo
->
Get
(
vtkDataObject
::
ORIGIN
(),
origin
);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
voi
[
i
]
=
this
->
VOI
[
i
];
...
...
@@ -112,26 +128,36 @@ vtkExtractVOI::ExecuteInformation(vtkImageData *input, vtkImageData *output)
{
outDims
[
i
]
=
1
;
}
outAR
[
i
]
=
ar
[
i
]
*
this
->
SampleRate
[
i
];
wholeExtent
[
i
*
2
]
=
voi
[
i
*
2
];
wholeExtent
[
i
*
2
+
1
]
=
voi
[
i
*
2
]
+
outDims
[
i
]
-
1
;
outOrigin
[
i
]
=
origin
[
i
]
+
voi
[
2
*
i
]
*
ar
[
i
]
-
wholeExtent
[
2
*
i
]
*
outAR
[
i
];
}
// This makes sense for sample rates of 1, 1, 1.
wholeExtent
[
0
]
=
voi
[
0
];
wholeExtent
[
1
]
=
voi
[
0
]
+
outDims
[
0
]
-
1
;
wholeExtent
[
2
]
=
voi
[
2
];
wholeExtent
[
3
]
=
voi
[
2
]
+
outDims
[
1
]
-
1
;
wholeExtent
[
4
]
=
voi
[
4
];
wholeExtent
[
5
]
=
voi
[
4
]
+
outDims
[
2
]
-
1
;
output
->
SetWholeExtent
(
wholeExtent
);
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
WHOLE_EXTENT
(),
wholeExtent
,
6
);
outInfo
->
Set
(
vtkDataObject
::
SPACING
(),
outAR
,
3
);
outInfo
->
Set
(
vtkDataObject
::
ORIGIN
(),
outOrigin
,
3
);
}
//-----------------------------------------------------------------------------
void
vtkExtractVOI
::
ExecuteData
(
vtkDataObject
*
)
void
vtkExtractVOI
::
ExecuteData
(
vtkInformation
*
request
,
vtkInformationVector
*
inputVector
,
vtkInformationVector
*
outputVector
)
{
vtkImageData
*
input
=
this
->
GetInput
();
// get the data objects
vtkInformation
*
outInfo
=
outputVector
->
GetInformationObject
(
0
);
vtkImageData
*
output
=
vtkImageData
::
SafeDownCast
(
outInfo
->
Get
(
vtkDataObject
::
DATA_OBJECT
()));
vtkInformation
*
inInfo
=
this
->
GetInputConnectionInformation
(
inputVector
,
0
,
0
);
vtkImageData
*
input
=
vtkImageData
::
SafeDownCast
(
inInfo
->
Get
(
vtkDataObject
::
DATA_OBJECT
()));
vtkPointData
*
pd
=
input
->
GetPointData
();
vtkCellData
*
cd
=
input
->
GetCellData
();
vtkImageData
*
output
=
this
->
GetOutput
();
output
->
SetExtent
(
output
->
GetWholeExtent
());
vtkPointData
*
outPD
=
output
->
GetPointData
();
vtkCellData
*
outCD
=
output
->
GetCellData
();
...
...
@@ -139,7 +165,8 @@ void vtkExtractVOI::ExecuteData(vtkDataObject *)
int
newCellId
;
double
origin
[
3
],
ar
[
3
],
outOrigin
[
3
],
outAR
[
3
];
int
sliceSize
,
outSize
,
jOffset
,
kOffset
,
rate
[
3
];
int
*
wholeExtent
=
input
->
GetWholeExtent
();
int
wholeExtent
[
6
];
inInfo
->
Get
(
vtkStreamingDemandDrivenPipeline
::
WHOLE_EXTENT
(),
wholeExtent
);
int
*
inExt
=
input
->
GetExtent
();
int
*
outExt
=
output
->
GetExtent
();
...
...
@@ -201,8 +228,6 @@ void vtkExtractVOI::ExecuteData(vtkDataObject *)
outSize
*=
outDims
[
i
];
}
output
->
SetSpacing
(
outAR
);
output
->
SetOrigin
(
outOrigin
);
//
// If output same as input, just pass data through
//
...
...
Imaging/vtkExtractVOI.h
View file @
7b4b09cc
...
...
@@ -36,12 +36,12 @@
#ifndef __vtkExtractVOI_h
#define __vtkExtractVOI_h
#include "vtkImage
ToImageFilter
.h"
#include "vtkImage
Algorithm
.h"
class
VTK_IMAGING_EXPORT
vtkExtractVOI
:
public
vtkImage
ToImageFilter
class
VTK_IMAGING_EXPORT
vtkExtractVOI
:
public
vtkImage
Algorithm
{
public:
vtkTypeRevisionMacro
(
vtkExtractVOI
,
vtkImage
ToImageFilter
);
vtkTypeRevisionMacro
(
vtkExtractVOI
,
vtkImage
Algorithm
);
void
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
);
// Description:
...
...
@@ -67,10 +67,16 @@ protected:
vtkExtractVOI
();
~
vtkExtractVOI
()
{};
virtual
void
ComputeInputUpdateExtent
(
int
inExt
[
6
],
int
outExt
[
6
]);
void
ExecuteInformation
(
vtkImageData
*
input
,
vtkImageData
*
output
);
void
ExecuteInformation
(){
this
->
vtkImageToImageFilter
::
ExecuteInformation
();};
virtual
void
ExecuteData
(
vtkDataObject
*
);
virtual
void
ComputeInputUpdateExtent
(
vtkInformation
*
,
vtkInformationVector
*
,
vtkInformationVector
*
);
void
ExecuteInformation
(
vtkInformation
*
,
vtkInformationVector
*
,
vtkInformationVector
*
);
virtual
void
ExecuteData
(
vtkInformation
*
request
,
vtkInformationVector
*
inputVector
,
vtkInformationVector
*
outputVector
);
int
VOI
[
6
];
int
SampleRate
[
3
];
...
...
Imaging/vtkImageSinusoidSource.cxx
View file @
7b4b09cc
...
...
@@ -15,11 +15,14 @@
#include "vtkImageSinusoidSource.h"
#include "vtkImageData.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include <math.h>
vtkCxxRevisionMacro
(
vtkImageSinusoidSource
,
"1.35"
);
vtkCxxRevisionMacro
(
vtkImageSinusoidSource
,
"1.35
.10.1
"
);
vtkStandardNewMacro
(
vtkImageSinusoidSource
);
//----------------------------------------------------------------------------
...
...
@@ -37,6 +40,7 @@ vtkImageSinusoidSource::vtkImageSinusoidSource()
this
->
WholeExtent
[
2
]
=
0
;
this
->
WholeExtent
[
3
]
=
255
;
this
->
WholeExtent
[
4
]
=
0
;
this
->
WholeExtent
[
5
]
=
0
;
this
->
SetNumberOfInputPorts
(
0
);
}
void
vtkImageSinusoidSource
::
SetDirection
(
double
v
[
3
])
...
...
@@ -119,13 +123,18 @@ void vtkImageSinusoidSource::SetWholeExtent(int xMin, int xMax,
}
//----------------------------------------------------------------------------
void
vtkImageSinusoidSource
::
ExecuteInformation
()
void
vtkImageSinusoidSource
::
ExecuteInformation
(
vtkInformation
*
vtkNotUsed
(
request
),
vtkInformationVector
*
vtkNotUsed
(
inputVector
),
vtkInformationVector
*
outputVector
)
{
vtkImageData
*
output
=
this
->
GetOutput
();
// get the info objects
vtkInformation
*
outInfo
=
outputVector
->
GetInformationObject
(
0
);
output
->
SetWholeExtent
(
this
->
WholeExtent
);
output
->
SetScalarType
(
VTK_DOUBLE
);
output
->
SetNumberOfScalarComponents
(
1
);
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
WHOLE_EXTENT
(),
this
->
WholeExtent
,
6
);
outInfo
->
Set
(
vtkDataObject
::
SCALAR_TYPE
(),
VTK_DOUBLE
);
outInfo
->
Set
(
vtkDataObject
::
SCALAR_NUMBER_OF_COMPONENTS
(),
1
);
}
void
vtkImageSinusoidSource
::
ExecuteData
(
vtkDataObject
*
output
)
...
...
Imaging/vtkImageSinusoidSource.h
View file @
7b4b09cc
...
...
@@ -21,13 +21,13 @@
#ifndef __vtkImageSinusoidSource_h
#define __vtkImageSinusoidSource_h
#include "vtkImage
Source
.h"
#include "vtkImage
Algorithm
.h"
class
VTK_IMAGING_EXPORT
vtkImageSinusoidSource
:
public
vtkImage
Source
class
VTK_IMAGING_EXPORT
vtkImageSinusoidSource
:
public
vtkImage
Algorithm
{
public:
static
vtkImageSinusoidSource
*
New
();
vtkTypeRevisionMacro
(
vtkImageSinusoidSource
,
vtkImage
Source
);
vtkTypeRevisionMacro
(
vtkImageSinusoidSource
,
vtkImage
Algorithm
);
void
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
);
// Description:
...
...
@@ -67,7 +67,7 @@ protected:
double
Phase
;
double
Amplitude
;
virtual
void
ExecuteInformation
(
);
virtual
void
ExecuteInformation
(
vtkInformation
*
,
vtkInformationVector
*
,
vtkInformationVector
*
);
virtual
void
ExecuteData
(
vtkDataObject
*
data
);
private:
vtkImageSinusoidSource
(
const
vtkImageSinusoidSource
&
);
// Not implemented.
...
...
Imaging/vtkTriangularTexture.cxx
View file @
7b4b09cc
...
...
@@ -16,11 +16,14 @@
#include "vtkImageData.h"
#include "vtkMath.h"
#include "vtkInformation.h"
#include "vtkInformationVector.h"
#include "vtkObjectFactory.h"
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkPointData.h"
#include "vtkUnsignedCharArray.h"
vtkCxxRevisionMacro
(
vtkTriangularTexture
,
"1.25"
);
vtkCxxRevisionMacro
(
vtkTriangularTexture
,
"1.25
.10.1
"
);
vtkStandardNewMacro
(
vtkTriangularTexture
);
// Instantiate object with XSize and YSize = 64; the texture pattern =1
...
...
@@ -31,6 +34,7 @@ vtkTriangularTexture::vtkTriangularTexture()
this
->
XSize
=
this
->
YSize
=
64
;
this
->
TexturePattern
=
1
;
this
->
ScaleFactor
=
1.0
;
this
->
SetNumberOfInputPorts
(
0
);
}
void
vtkOpaqueAtElementCentroid
(
int
XSize
,
int
YSize
,
double
ScaleFactor
,
...
...
@@ -137,13 +141,19 @@ void vtkOpaqueAtVertices (int XSize, int YSize, double ScaleFactor,
}
//----------------------------------------------------------------------------
void
vtkTriangularTexture
::
ExecuteInformation
()
void
vtkTriangularTexture
::
ExecuteInformation
(
vtkInformation
*
vtkNotUsed
(
request
),
vtkInformationVector
*
vtkNotUsed
(
inputVector
),
vtkInformationVector
*
outputVector
)
{
vtkImageData
*
output
=
this
->
GetOutput
();
// get the info objects
vtkInformation
*
outInfo
=
outputVector
->
GetInformationObject
(
0
);
output
->
SetWholeExtent
(
0
,
this
->
XSize
-
1
,
0
,
this
->
YSize
-
1
,
0
,
0
);
output
->
SetScalarType
(
VTK_UNSIGNED_CHAR
);
output
->
SetNumberOfScalarComponents
(
2
);
int
wExt
[
6
]
=
{
0
,
this
->
XSize
-
1
,
0
,
this
->
YSize
-
1
,
0
,
0
};
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
WHOLE_EXTENT
(),
wExt
,
6
);
outInfo
->
Set
(
vtkDataObject
::
SCALAR_TYPE
(),
VTK_UNSIGNED_CHAR
);
outInfo
->
Set
(
vtkDataObject
::
SCALAR_NUMBER_OF_COMPONENTS
(),
2
);
}
void
vtkTriangularTexture
::
ExecuteData
(
vtkDataObject
*
outp
)
...
...
Imaging/vtkTriangularTexture.h
View file @
7b4b09cc
...
...
@@ -28,12 +28,12 @@
#ifndef __vtkTriangularTexture_h
#define __vtkTriangularTexture_h
#include "vtkImage
Source
.h"
#include "vtkImage
Algorithm
.h"
class
VTK_IMAGING_EXPORT
vtkTriangularTexture
:
public
vtkImage
Source
class
VTK_IMAGING_EXPORT
vtkTriangularTexture
:
public
vtkImage
Algorithm
{
public:
vtkTypeRevisionMacro
(
vtkTriangularTexture
,
vtkImage
Source
);
vtkTypeRevisionMacro
(
vtkTriangularTexture
,
vtkImage
Algorithm
);
void
PrintSelf
(
ostream
&
os
,
vtkIndent
indent
);
// Description:
...
...
@@ -68,7 +68,7 @@ protected:
vtkTriangularTexture
();
~
vtkTriangularTexture
()
{};
virtual
void
ExecuteInformation
(
);
virtual
void
ExecuteInformation
(
vtkInformation
*
,
vtkInformationVector
*
,
vtkInformationVector
*
);
virtual
void
ExecuteData
(
vtkDataObject
*
data
);
int
XSize
;
...
...
Parallel/vtkPDataSetReader.cxx
View file @
7b4b09cc
...
...
@@ -31,7 +31,7 @@
#include "vtkUnstructuredGrid.h"
#include "vtkExtentTranslator.h"
vtkCxxRevisionMacro
(
vtkPDataSetReader
,
"1.30"
);
vtkCxxRevisionMacro
(
vtkPDataSetReader
,
"1.30
.6.1
"
);
vtkStandardNewMacro
(
vtkPDataSetReader
);
//----------------------------------------------------------------------------
...
...
@@ -1318,13 +1318,14 @@ void vtkPDataSetReader::StructuredGridExecute()
{
if
(
pieceMask
[
i
])
{
tmp
=
vtkStructuredGrid
::
New
();
reader
->
SetOutput
(
tmp
);
reader
->
SetOutput
(
0
);
reader
->
SetFileName
(
this
->
PieceFileNames
[
i
]);
reader
->
Update
();
tmp
=
reader
->
GetOutput
();
if
(
tmp
->
GetNumberOfCells
()
>
0
)
{
pieces
[
count
]
=
tmp
;
tmp
->
Register
(
this
);
// Sanity check: extent is correct. Ignore electric slide.
tmp
->
GetExtent
(
ext
);
if
(
ext
[
1
]
-
ext
[
0
]
!=
...
...
@@ -1344,10 +1345,6 @@ void vtkPDataSetReader::StructuredGridExecute()
}
++
count
;
}
else
{
tmp
->
Delete
();
}
}
}
...
...
Parallel/vtkPDataSetWriter.cxx
View file @
7b4b09cc
...
...
@@ -22,7 +22,7 @@
#include "vtkRectilinearGrid.h"
#include "vtkErrorCode.h"
vtkCxxRevisionMacro
(
vtkPDataSetWriter
,
"1.12"
);
vtkCxxRevisionMacro
(
vtkPDataSetWriter
,
"1.12
.10.1
"
);
vtkStandardNewMacro
(
vtkPDataSetWriter
);
//----------------------------------------------------------------------------
...
...
@@ -254,8 +254,9 @@ void vtkPDataSetWriter::Write()
// I am putting this in here because shallow copy does not copy the
// UpdateExtentInitializedFlag, and I do not want to touch ShallowCopy
// in ParaViews release.
copy
->
SetUpdateExtent
(
0
,
1
,
0
);
copy
->
SetUpdateExtent
(
input
->
GetUpdateExtent
());
copy
->
SetRequestExactExtent
(
1
);
copy
->
Crop
(
);
writer
->
SetInput
(
vtkDataSet
::
SafeDownCast
(
copy
));
writer
->
Write
();
copy
->
Delete
();
...
...
Utilities/Upgrading/NewPipeConvert.cmake
View file @
7b4b09cc
...
...
@@ -15,15 +15,23 @@ FILE (GLOB CXX_FILE ${CLASS}.cxx)
FILE
(
READ
${
H_FILE
}
H_CONTENTS
)
# convert vtkImageToImageFilter subclasses to subclass off of
# vtkImageAlgorithm
STRING
(
REGEX REPLACE
"vtkImageToImageFilter"
"vtkThreadedImageAlgorithm"
H_CONTENTS
"
${
H_CONTENTS
}
"
)
STRING
(
REGEX REPLACE
"vtkImageSource"
"vtkImageAlgorithm"
H_CONTENTS
"
${
H_CONTENTS
}
"
)
# vtkImageAlgorithm, if it is threaded use threaded one
IF
(
"
${
CXX_CONTENTS
}
"
MATCHES
".*ThreadedExecute.*"
)
STRING
(
REGEX REPLACE
"vtkImageToImageFilter"
"vtkThreadedImageAlgorithm"
H_CONTENTS
"
${
H_CONTENTS
}
"
)
ELSE
(
"
${
CXX_CONTENTS
}
"
MATCHES
".*ThreadedExecute.*"
)
STRING
(
REGEX REPLACE
"vtkImageToImageFilter"
"vtkImageAlgorithm"
H_CONTENTS
"
${
H_CONTENTS
}
"
)
STRING
(
REGEX REPLACE
"vtkImageSource"
"vtkImageAlgorithm"
H_CONTENTS
"
${
H_CONTENTS
}
"
)
ENDIF
(
"
${
CXX_CONTENTS
}
"
MATCHES
".*ThreadedExecute.*"
)
# polyDataAlgorithm
STRING
(
REGEX REPLACE
...
...
Utilities/Upgrading/TheNewVTKPipeline.doc
View file @
7b4b09cc
No preview for this file type
Write
Preview
Markdown
is supported
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