Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Michael Migliore
VTK
Commits
d10d7093
Commit
d10d7093
authored
Jun 07, 2011
by
Berk Geveci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More progress. Everything compiles now
parent
56788e10
Changes
101
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
316 additions
and
223 deletions
+316
-223
Charts/Testing/Cxx/TestHistogram2D.cxx
Charts/Testing/Cxx/TestHistogram2D.cxx
+1
-3
Charts/vtkColorLegend.cxx
Charts/vtkColorLegend.cxx
+1
-3
Charts/vtkColorTransferFunctionItem.cxx
Charts/vtkColorTransferFunctionItem.cxx
+1
-3
Charts/vtkLookupTableItem.cxx
Charts/vtkLookupTableItem.cxx
+1
-3
Charts/vtkPiecewiseFunctionItem.cxx
Charts/vtkPiecewiseFunctionItem.cxx
+1
-3
Charts/vtkPlotHistogram2D.cxx
Charts/vtkPlotHistogram2D.cxx
+1
-3
Charts/vtkPlotPoints.cxx
Charts/vtkPlotPoints.cxx
+1
-5
Filtering/Testing/Cxx/TestPointLocators.cxx
Filtering/Testing/Cxx/TestPointLocators.cxx
+0
-1
Filtering/vtkAlgorithm.cxx
Filtering/vtkAlgorithm.cxx
+61
-0
Filtering/vtkAlgorithm.h
Filtering/vtkAlgorithm.h
+46
-1
Filtering/vtkDataObject.cxx
Filtering/vtkDataObject.cxx
+1
-1
Filtering/vtkDataObject.h
Filtering/vtkDataObject.h
+1
-1
Filtering/vtkStreamingDemandDrivenPipeline.cxx
Filtering/vtkStreamingDemandDrivenPipeline.cxx
+4
-3
Geovis/vtkGeoAlignedImageSource.cxx
Geovis/vtkGeoAlignedImageSource.cxx
+1
-2
Geovis/vtkGeoImageNode.cxx
Geovis/vtkGeoImageNode.cxx
+1
-2
Graphics/Testing/Cxx/BoxClipTetrahedra.cxx
Graphics/Testing/Cxx/BoxClipTetrahedra.cxx
+0
-2
Graphics/Testing/Cxx/BoxClipTriangulate.cxx
Graphics/Testing/Cxx/BoxClipTriangulate.cxx
+4
-3
Graphics/Testing/Cxx/TestBareScalarsToColors.cxx
Graphics/Testing/Cxx/TestBareScalarsToColors.cxx
+0
-1
Graphics/Testing/Cxx/TestExtraction.cxx
Graphics/Testing/Cxx/TestExtraction.cxx
+0
-1
Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx
Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx
+0
-1
Graphics/Testing/Cxx/TestQuadraturePoints.cxx
Graphics/Testing/Cxx/TestQuadraturePoints.cxx
+4
-4
Hybrid/Testing/Cxx/TestImageStencilData.cxx
Hybrid/Testing/Cxx/TestImageStencilData.cxx
+7
-6
Hybrid/vtkAxesActor.cxx
Hybrid/vtkAxesActor.cxx
+4
-4
Hybrid/vtkBarChartActor.cxx
Hybrid/vtkBarChartActor.cxx
+0
-2
Hybrid/vtkCaptionActor2D.cxx
Hybrid/vtkCaptionActor2D.cxx
+0
-2
Hybrid/vtkCubeAxesActor2D.cxx
Hybrid/vtkCubeAxesActor2D.cxx
+0
-1
Hybrid/vtkGridTransform.cxx
Hybrid/vtkGridTransform.cxx
+5
-3
Hybrid/vtkImageDataLIC2D.cxx
Hybrid/vtkImageDataLIC2D.cxx
+2
-3
Hybrid/vtkImplicitModeller.cxx
Hybrid/vtkImplicitModeller.cxx
+3
-1
Hybrid/vtkLegendBoxActor.cxx
Hybrid/vtkLegendBoxActor.cxx
+1
-1
Hybrid/vtkMNITransformReader.cxx
Hybrid/vtkMNITransformReader.cxx
+1
-1
Hybrid/vtkPieChartActor.cxx
Hybrid/vtkPieChartActor.cxx
+1
-1
Hybrid/vtkRIBExporter.cxx
Hybrid/vtkRIBExporter.cxx
+1
-4
Hybrid/vtkRenderLargeImage.cxx
Hybrid/vtkRenderLargeImage.cxx
+2
-1
Hybrid/vtkSpiderPlotActor.cxx
Hybrid/vtkSpiderPlotActor.cxx
+1
-1
Hybrid/vtkStructuredGridLIC2D.cxx
Hybrid/vtkStructuredGridLIC2D.cxx
+1
-2
Hybrid/vtkX3DExporter.cxx
Hybrid/vtkX3DExporter.cxx
+1
-1
Hybrid/vtkXYPlotActor.cxx
Hybrid/vtkXYPlotActor.cxx
+3
-3
IO/Testing/Cxx/TestMetaIO.cxx
IO/Testing/Cxx/TestMetaIO.cxx
+1
-1
Imaging/Testing/Cxx/FastSplatter.cxx
Imaging/Testing/Cxx/FastSplatter.cxx
+1
-3
Infovis/vtkAttributeClustering2DLayoutStrategy.cxx
Infovis/vtkAttributeClustering2DLayoutStrategy.cxx
+2
-6
Infovis/vtkClustering2DLayoutStrategy.cxx
Infovis/vtkClustering2DLayoutStrategy.cxx
+2
-6
Infovis/vtkCommunity2DLayoutStrategy.cxx
Infovis/vtkCommunity2DLayoutStrategy.cxx
+2
-6
Infovis/vtkConstrained2DLayoutStrategy.cxx
Infovis/vtkConstrained2DLayoutStrategy.cxx
+2
-6
Infovis/vtkExtractHistogram2D.cxx
Infovis/vtkExtractHistogram2D.cxx
+1
-8
Infovis/vtkFast2DLayoutStrategy.cxx
Infovis/vtkFast2DLayoutStrategy.cxx
+2
-6
Infovis/vtkSCurveSpline.cxx
Infovis/vtkSCurveSpline.cxx
+1
-1
Parallel/Testing/Cxx/TestDistributedDataCompositeZPass.cxx
Parallel/Testing/Cxx/TestDistributedDataCompositeZPass.cxx
+1
-2
Parallel/Testing/Cxx/TestPCompositeZPass.cxx
Parallel/Testing/Cxx/TestPCompositeZPass.cxx
+1
-2
Parallel/Testing/Cxx/TransmitImageData.cxx
Parallel/Testing/Cxx/TransmitImageData.cxx
+2
-1
Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx
Parallel/Testing/Cxx/TransmitImageDataRenderPass.cxx
+2
-1
Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx
Parallel/Testing/Cxx/TransmitRectilinearGrid.cxx
+2
-1
Parallel/Testing/Cxx/TransmitStructuredGrid.cxx
Parallel/Testing/Cxx/TransmitStructuredGrid.cxx
+2
-1
Parallel/vtkDistributedDataFilter.cxx
Parallel/vtkDistributedDataFilter.cxx
+1
-1
Parallel/vtkEnSightWriter.cxx
Parallel/vtkEnSightWriter.cxx
+6
-3
Parallel/vtkExtractCTHPart.cxx
Parallel/vtkExtractCTHPart.cxx
+8
-2
Parallel/vtkExtractCTHPart.h
Parallel/vtkExtractCTHPart.h
+2
-0
Parallel/vtkPChacoReader.cxx
Parallel/vtkPChacoReader.cxx
+1
-1
Parallel/vtkPDataSetReader.cxx
Parallel/vtkPDataSetReader.cxx
+11
-8
Parallel/vtkPDataSetWriter.cxx
Parallel/vtkPDataSetWriter.cxx
+25
-16
Parallel/vtkPImageWriter.cxx
Parallel/vtkPImageWriter.cxx
+25
-16
Parallel/vtkPImageWriter.h
Parallel/vtkPImageWriter.h
+3
-3
Parallel/vtkPKdTree.cxx
Parallel/vtkPKdTree.cxx
+0
-6
Parallel/vtkPNrrdReader.cxx
Parallel/vtkPNrrdReader.cxx
+0
-2
Parallel/vtkPipelineSize.cxx
Parallel/vtkPipelineSize.cxx
+3
-2
Parallel/vtkSynchronizedRenderers.cxx
Parallel/vtkSynchronizedRenderers.cxx
+2
-4
Parallel/vtkTransmitImageDataPiece.cxx
Parallel/vtkTransmitImageDataPiece.cxx
+12
-4
Parallel/vtkTransmitPolyDataPiece.cxx
Parallel/vtkTransmitPolyDataPiece.cxx
+0
-1
Parallel/vtkTransmitRectilinearGridPiece.cxx
Parallel/vtkTransmitRectilinearGridPiece.cxx
+10
-3
Parallel/vtkTransmitStructuredGridPiece.cxx
Parallel/vtkTransmitStructuredGridPiece.cxx
+10
-3
Parallel/vtkTransmitUnstructuredGridPiece.cxx
Parallel/vtkTransmitUnstructuredGridPiece.cxx
+0
-1
Parallel/vtkVPICReader.cxx
Parallel/vtkVPICReader.cxx
+0
-1
Parallel/vtkWindBladeReader.cxx
Parallel/vtkWindBladeReader.cxx
+2
-3
Rendering/vtkFreeTypeTools.cxx
Rendering/vtkFreeTypeTools.cxx
+8
-8
Rendering/vtkOpenGLGlyph3DMapper.cxx
Rendering/vtkOpenGLGlyph3DMapper.cxx
+0
-1
No files found.
Charts/Testing/Cxx/TestHistogram2D.cxx
View file @
d10d7093
...
...
@@ -38,9 +38,7 @@ int TestHistogram2D(int, char * [])
vtkNew
<
vtkImageData
>
data
;
data
->
SetExtent
(
0
,
size
-
1
,
0
,
size
-
1
,
0
,
0
);
data
->
SetNumberOfScalarComponents
(
1
);
data
->
SetScalarTypeToDouble
();
data
->
AllocateScalars
();
data
->
AllocateScalars
(
VTK_DOUBLE
,
1
);
data
->
SetOrigin
(
100.0
,
0.0
,
0.0
);
data
->
SetSpacing
(
2.0
,
1.0
,
1.0
);
...
...
Charts/vtkColorLegend.cxx
View file @
d10d7093
...
...
@@ -170,9 +170,7 @@ void vtkColorLegend::ComputeTexture()
this
->
ImageData
->
SetExtent
(
0
,
0
,
0
,
dimension
-
1
,
0
,
0
);
this
->
ImageData
->
SetNumberOfScalarComponents
(
3
);
this
->
ImageData
->
SetScalarTypeToUnsignedChar
();
this
->
ImageData
->
AllocateScalars
();
this
->
ImageData
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
3
);
for
(
int
i
=
0
;
i
<
dimension
;
++
i
)
{
...
...
Charts/vtkColorTransferFunctionItem.cxx
View file @
d10d7093
...
...
@@ -106,9 +106,7 @@ void vtkColorTransferFunctionItem::ComputeTexture()
this
->
Texture
->
SetExtent
(
0
,
dimension
-
1
,
0
,
0
,
0
,
0
);
this
->
Texture
->
SetNumberOfScalarComponents
(
4
);
this
->
Texture
->
SetScalarTypeToUnsignedChar
();
this
->
Texture
->
AllocateScalars
();
this
->
Texture
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
4
);
for
(
int
i
=
0
;
i
<
dimension
;
++
i
)
{
...
...
Charts/vtkLookupTableItem.cxx
View file @
d10d7093
...
...
@@ -96,9 +96,7 @@ void vtkLookupTableItem::ComputeTexture()
this
->
Texture
->
SetExtent
(
0
,
dimension
-
1
,
0
,
0
,
0
,
0
);
this
->
Texture
->
SetNumberOfScalarComponents
(
4
);
this
->
Texture
->
SetScalarTypeToUnsignedChar
();
this
->
Texture
->
AllocateScalars
();
this
->
Texture
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
4
);
// TODO: Support log scale ?
double
bounds
[
4
];
this
->
GetBounds
(
bounds
);
...
...
Charts/vtkPiecewiseFunctionItem.cxx
View file @
d10d7093
...
...
@@ -108,9 +108,7 @@ void vtkPiecewiseFunctionItem::ComputeTexture()
this
->
Texture
->
SetExtent
(
0
,
dimension
-
1
,
0
,
0
,
0
,
0
);
this
->
Texture
->
SetNumberOfScalarComponents
(
4
);
this
->
Texture
->
SetScalarTypeToUnsignedChar
();
this
->
Texture
->
AllocateScalars
();
this
->
Texture
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
4
);
this
->
PiecewiseFunction
->
GetTable
(
bounds
[
0
],
bounds
[
1
],
dimension
,
values
);
unsigned
char
*
ptr
=
...
...
Charts/vtkPlotHistogram2D.cxx
View file @
d10d7093
...
...
@@ -126,9 +126,7 @@ void vtkPlotHistogram2D::GenerateHistogram()
this
->
Output
=
vtkSmartPointer
<
vtkImageData
>::
New
();
}
this
->
Output
->
SetExtent
(
this
->
Input
->
GetExtent
());
this
->
Output
->
SetNumberOfScalarComponents
(
4
);
this
->
Output
->
SetScalarTypeToUnsignedChar
();
this
->
Output
->
AllocateScalars
();
this
->
Output
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
4
);
int
dimension
=
this
->
Input
->
GetDimensions
()[
0
]
*
this
->
Input
->
GetDimensions
()[
1
];
double
*
input
=
reinterpret_cast
<
double
*>
(
this
->
Input
->
GetScalarPointer
());
...
...
Charts/vtkPlotPoints.cxx
View file @
d10d7093
...
...
@@ -228,8 +228,6 @@ void vtkPlotPoints::GeneraterMarker(int width, bool highlight)
if
(
!
this
->
Marker
)
{
this
->
Marker
=
vtkImageData
::
New
();
this
->
Marker
->
SetScalarTypeToUnsignedChar
();
this
->
Marker
->
SetNumberOfScalarComponents
(
4
);
}
else
{
...
...
@@ -247,8 +245,6 @@ void vtkPlotPoints::GeneraterMarker(int width, bool highlight)
if
(
!
this
->
HighlightMarker
)
{
this
->
HighlightMarker
=
vtkImageData
::
New
();
this
->
HighlightMarker
->
SetScalarTypeToUnsignedChar
();
this
->
HighlightMarker
->
SetNumberOfScalarComponents
(
4
);
data
=
this
->
HighlightMarker
;
}
else
...
...
@@ -264,7 +260,7 @@ void vtkPlotPoints::GeneraterMarker(int width, bool highlight)
}
data
->
SetExtent
(
0
,
width
-
1
,
0
,
width
-
1
,
0
,
0
);
data
->
AllocateScalars
();
data
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
4
);
unsigned
char
*
image
=
static_cast
<
unsigned
char
*>
(
data
->
GetScalarPointer
());
...
...
Filtering/Testing/Cxx/TestPointLocators.cxx
View file @
d10d7093
...
...
@@ -122,7 +122,6 @@ int ComparePointLocators(vtkAbstractPointLocator* locator1, vtkAbstractPointLoca
}
}
sgrid
->
SetPoints
(
points
);
sgrid
->
Update
();
points
->
Delete
();
locator1
->
SetDataSet
(
sgrid
);
...
...
Filtering/vtkAlgorithm.cxx
View file @
d10d7093
...
...
@@ -1338,6 +1338,17 @@ void vtkAlgorithm::Update()
this
->
GetExecutive
()
->
Update
();
}
//----------------------------------------------------------------------------
void
vtkAlgorithm
::
PropagateUpdateExtent
()
{
vtkStreamingDemandDrivenPipeline
*
sddp
=
vtkStreamingDemandDrivenPipeline
::
SafeDownCast
(
this
->
GetExecutive
());
if
(
sddp
)
{
sddp
->
PropagateUpdateExtent
(
-
1
);
}
}
//----------------------------------------------------------------------------
void
vtkAlgorithm
::
UpdateInformation
()
{
...
...
@@ -1532,3 +1543,53 @@ double vtkAlgorithm::ComputePriority()
return
sddp
->
ComputePriority
(
0
);
}
//-------------------------------------------------------------
int
vtkAlgorithm
::
SetUpdateExtentToWholeExtent
(
int
port
,
int
connection
)
{
if
(
this
->
GetInputInformation
(
port
,
connection
))
{
return
vtkStreamingDemandDrivenPipeline
::
SetUpdateExtentToWholeExtent
(
this
->
GetInputInformation
(
port
,
connection
));
}
else
{
return
0
;
}
}
//-------------------------------------------------------------
int
vtkAlgorithm
::
SetUpdateExtentToWholeExtent
()
{
return
this
->
SetUpdateExtentToWholeExtent
(
0
,
0
);
}
//-------------------------------------------------------------
void
vtkAlgorithm
::
SetUpdateExtent
(
int
port
,
int
connection
,
int
piece
,
int
numPieces
,
int
ghostLevel
)
{
if
(
this
->
GetInputInformation
(
port
,
connection
))
{
vtkStreamingDemandDrivenPipeline
::
SetUpdateExtent
(
this
->
GetInputInformation
(
port
,
connection
),
piece
,
numPieces
,
ghostLevel
);
}
}
//-------------------------------------------------------------
void
vtkAlgorithm
::
SetUpdateExtent
(
int
port
,
int
connection
,
int
extent
[
6
])
{
if
(
this
->
GetInputInformation
(
port
,
connection
))
{
vtkStreamingDemandDrivenPipeline
::
SetUpdateExtent
(
this
->
GetInputInformation
(
port
,
connection
),
extent
);
}
}
Filtering/vtkAlgorithm.h
View file @
d10d7093
...
...
@@ -371,9 +371,13 @@ public:
virtual
void
Update
();
// Description:
// B
ackward compatibility method to invoke UpdateInformation on executiv
e.
// B
ring the algorithm's information up-to-dat
e.
virtual
void
UpdateInformation
();
// Description::
// Propagate meta-data upstream.
virtual
void
PropagateUpdateExtent
();
// Description:
// Bring this algorithm's outputs up-to-date.
virtual
void
UpdateWholeExtent
();
...
...
@@ -427,6 +431,47 @@ public:
static
vtkInformationIntegerKey
*
PRESERVES_ATTRIBUTES
();
static
vtkInformationIntegerKey
*
PRESERVES_RANGES
();
// Description:
// If the whole input extent is required to generate the requested output
// extent, this method can be called to set the input update extent to the
// whole input extent. This method assumes that the whole extent is known
// (that UpdateInformation has been called).
// This function has no effect is input connection is not established.
int
SetUpdateExtentToWholeExtent
(
int
port
,
int
connection
);
// Description:
// Convenience function equivalent to SetUpdateExtentToWholeExtent(0, 0)
// This function has no effect is input connection is not established.
int
SetUpdateExtentToWholeExtent
();
// Description:
// Set the update extent in terms of piece and ghost levels.
// This function has no effect is input connection is not established.
void
SetUpdateExtent
(
int
port
,
int
connection
,
int
piece
,
int
numPieces
,
int
ghostLevel
);
// Description:
// Convenience function equivalent to SetUpdateExtent(0, 0, piece,
// numPieces, ghostLevel)
// This function has no effect is input connection is not established.
void
SetUpdateExtent
(
int
piece
,
int
numPieces
,
int
ghostLevel
)
{
this
->
SetUpdateExtent
(
0
,
0
,
piece
,
numPieces
,
ghostLevel
);
}
// Description:
// Set the update extent for data objects that use 3D extents
// This function has no effect is input connection is not established.
void
SetUpdateExtent
(
int
port
,
int
connection
,
int
extent
[
6
]);
// Description:
// Convenience function equivalent to SetUpdateExtent(0, 0, extent)
// This function has no effect is input connection is not established.
void
SetUpdateExtent
(
int
extent
[
6
])
{
this
->
SetUpdateExtent
(
0
,
0
,
extent
);
}
protected:
vtkAlgorithm
();
~
vtkAlgorithm
();
...
...
Filtering/vtkDataObject.cxx
View file @
d10d7093
...
...
@@ -752,7 +752,7 @@ void vtkDataObject::InternalDataObjectCopy(vtkDataObject *src)
//----------------------------------------------------------------------------
// This should be a pure virutal method.
void
vtkDataObject
::
Crop
()
void
vtkDataObject
::
Crop
(
const
int
*
updateExtent
)
{
}
...
...
Filtering/vtkDataObject.h
View file @
d10d7093
...
...
@@ -249,7 +249,7 @@ public:
// Description:
// This method crops the data object (if necesary) so that the extent
// matches the update extent.
virtual
void
Crop
();
virtual
void
Crop
(
const
int
*
updateExtent
);
//BTX
// Description:
...
...
Filtering/vtkStreamingDemandDrivenPipeline.cxx
View file @
d10d7093
...
...
@@ -78,9 +78,9 @@ vtkInformationKeyMacro(vtkStreamingDemandDrivenPipeline, PREVIOUS_FAST_PATH_ID_T
class
vtkStreamingDemandDrivenPipelineToDataObjectFriendship
{
public:
static
void
Crop
(
vtkDataObject
*
obj
)
static
void
Crop
(
vtkDataObject
*
obj
,
const
int
*
extent
)
{
obj
->
Crop
();
obj
->
Crop
(
extent
);
}
};
...
...
@@ -270,7 +270,8 @@ int vtkStreamingDemandDrivenPipeline
if
(
info
->
Has
(
EXACT_EXTENT
())
&&
info
->
Get
(
EXACT_EXTENT
()))
{
vtkDataObject
*
data
=
info
->
Get
(
vtkDataObject
::
DATA_OBJECT
());
vtkStreamingDemandDrivenPipelineToDataObjectFriendship
::
Crop
(
data
);
vtkStreamingDemandDrivenPipelineToDataObjectFriendship
::
Crop
(
data
,
info
->
Get
(
UPDATE_EXTENT
()));
}
// Clear combined update extent, since the update cycle has completed
if
(
info
->
Has
(
COMBINED_UPDATE_EXTENT
()))
...
...
Geovis/vtkGeoAlignedImageSource.cxx
View file @
d10d7093
...
...
@@ -371,8 +371,7 @@ void vtkGeoAlignedImageSource::CropImageForNode(vtkGeoImageNode* node, vtkImageD
vtkSmartPointer
<
vtkImageData
>
cropped
=
vtkSmartPointer
<
vtkImageData
>::
New
();
cropped
->
ShallowCopy
(
image
);
cropped
->
SetUpdateExtent
(
ext
);
cropped
->
Crop
();
cropped
->
Crop
(
ext
);
// Now set the longitude and latitude range based on the actual image size.
double
lonRange
[
2
];
...
...
Geovis/vtkGeoImageNode.cxx
View file @
d10d7093
...
...
@@ -160,8 +160,7 @@ void vtkGeoImageNode::CropImageForTile(
this
->
Image
=
vtkSmartPointer
<
vtkImageData
>::
New
();
}
this
->
Image
->
ShallowCopy
(
image
);
this
->
Image
->
SetUpdateExtent
(
ext
);
this
->
Image
->
Crop
();
this
->
Image
->
Crop
(
ext
);
// Now set the longitude and latitude range based on the actual image size.
this
->
LongitudeRange
[
0
]
=
origin
[
0
]
+
ext
[
0
]
*
spacing
[
0
];
...
...
Graphics/Testing/Cxx/BoxClipTetrahedra.cxx
View file @
d10d7093
...
...
@@ -118,8 +118,6 @@ public:
static
void
CheckWinding
(
vtkUnstructuredGrid
*
data
)
{
data
->
Update
();
vtkPoints
*
points
=
data
->
GetPoints
();
vtkCellArray
*
cells
=
data
->
GetCells
();
...
...
Graphics/Testing/Cxx/BoxClipTriangulate.cxx
View file @
d10d7093
...
...
@@ -124,9 +124,10 @@ class BoxClipTriangulateFailed { };
//-----------------------------------------------------------------------------
static
void
CheckWinding
(
vtk
UnstructuredGrid
*
data
)
static
void
CheckWinding
(
vtk
BoxClipDataSet
*
alg
)
{
data
->
Update
();
alg
->
Update
();
vtkUnstructuredGrid
*
data
=
alg
->
GetOutput
();
vtkPoints
*
points
=
data
->
GetPoints
();
...
...
@@ -307,7 +308,7 @@ static void Check3DPrimitive(int type, vtkIdType numcells,
iren->Start();
#endif
CheckWinding
(
output
);
CheckWinding
(
clipper
);
VTK_CREATE
(
vtkDataSetSurfaceFilter
,
surface
);
surface
->
SetInput
(
output
);
...
...
Graphics/Testing/Cxx/TestBareScalarsToColors.cxx
View file @
d10d7093
...
...
@@ -151,7 +151,6 @@ int TestBareScalarsToColors(int argc, char *argv[])
vtkNew
<
vtkImageData
>
image
;
image
->
SetDimensions
(
80
,
80
,
1
);
image
->
SetScalarTypeToUnsignedChar
();
vtkUnsignedCharArray
*
colors
=
table2
->
MapScalars
(
outputs
[
i
],
VTK_COLOR_MODE_DEFAULT
,
outputc
);
image
->
GetPointData
()
->
SetScalars
(
colors
);
...
...
Graphics/Testing/Cxx/TestExtraction.cxx
View file @
d10d7093
...
...
@@ -156,7 +156,6 @@ int TestExtraction(int argc, char *argv[])
sampleData
->
SetSpacing
(
1.0
,
1.0
,
1.0
);
sampleData
->
SetOrigin
(
0.0
,
0.0
,
0.0
);
sampleData
->
SetDimensions
(
XCELLS
+
1
,
YCELLS
+
1
,
ZCELLS
+
1
);
sampleData
->
SetWholeExtent
(
0
,
XCELLS
+
1
,
0
,
YCELLS
+
1
,
0
,
ZCELLS
+
1
);
sampleData
->
AllocateScalars
();
vtkIdTypeArray
*
pia
=
vtkIdTypeArray
::
New
();
...
...
Graphics/Testing/Cxx/TestMapVectorsAsRGBColors.cxx
View file @
d10d7093
...
...
@@ -135,7 +135,6 @@ int TestMapVectorsAsRGBColors(int argc, char *argv[])
vtkSmartPointer
<
vtkImageData
>
image
=
vtkSmartPointer
<
vtkImageData
>::
New
();
image
->
SetDimensions
(
80
,
80
,
1
);
image
->
SetScalarTypeToUnsignedChar
();
vtkUnsignedCharArray
*
colors
=
table2
->
MapScalars
(
outputs
[
i
],
VTK_COLOR_MODE_DEFAULT
,
outputc
);
image
->
GetPointData
()
->
SetScalars
(
colors
);
...
...
Graphics/Testing/Cxx/TestQuadraturePoints.cxx
View file @
d10d7093
...
...
@@ -81,13 +81,13 @@ int TestQuadraturePoints(int argc,char *argv[])
if
(
xusgr
->
CanReadFile
(
inputFileName
.
c_str
()))
{
input
=
xusgr
->
GetOutput
();
input
->
Update
();
xusgr
->
Update
();
}
else
if
(
lusgr
->
IsFileValid
(
"unstructured_grid"
))
{
lusgr
->
SetFileName
(
inputFileName
.
c_str
());
input
=
lusgr
->
GetOutput
();
input
->
Update
();
lusgr
->
Update
();
}
if
(
input
==
0
)
{
...
...
@@ -129,7 +129,7 @@ int TestQuadraturePoints(int argc,char *argv[])
xusgr->SetFileName(tempFile.c_str());
input=xusgr->GetOutput();*/
input
=
vtkUnstructuredGrid
::
SafeDownCast
(
fieldInterp
->
GetOutput
());
input
->
Update
();
fieldInterp
->
Update
();
input
->
GetPointData
()
->
SetActiveVectors
(
warpName
.
c_str
());
input
->
GetPointData
()
->
SetActiveScalars
(
threshName
.
c_str
());
// Demonstrate warp by vector.
...
...
@@ -155,7 +155,7 @@ int TestQuadraturePoints(int argc,char *argv[])
pointGen
->
SetInputArrayToProcess
(
0
,
0
,
0
,
vtkDataObject
::
FIELD_ASSOCIATION_CELLS
,
"QuadratureOffset"
);
pointGen
->
SetInputConnection
(
thresholder
->
GetOutputPort
());
vtkPolyData
*
output
=
vtkPolyData
::
SafeDownCast
(
pointGen
->
GetOutput
());
output
->
Update
();
pointGen
->
Update
();
const
char
*
activeScalars
=
"pressure"
;
output
->
GetPointData
()
->
SetActiveScalars
(
activeScalars
);
...
...
Hybrid/Testing/Cxx/TestImageStencilData.cxx
View file @
d10d7093
...
...
@@ -29,6 +29,7 @@
#include "vtkMatrixToLinearTransform.h"
#include "vtkTransformPolyDataFilter.h"
#include "vtkMatrix4x4.h"
#include "vtkTrivialProducer.h"
#include "vtkTesting.h"
...
...
@@ -82,8 +83,7 @@ CreateBoxStencilData(double d1, double d2 )
image
->
SetOrigin
(
0.0
,
0.0
,
0.0
);
image
->
SetExtent
(
static_cast
<
int
>
(
d1
)
-
2
,
static_cast
<
int
>
(
d2
)
+
2
,
static_cast
<
int
>
(
d1
)
-
2
,
static_cast
<
int
>
(
d2
)
+
2
,
0
,
0
);
image
->
SetScalarTypeToUnsignedChar
();
image
->
AllocateScalars
();
image
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
1
);
vtkImageStencil
*
stencil
=
vtkImageStencil
::
New
();
stencil
->
SetInput
(
image
);
...
...
@@ -112,9 +112,7 @@ static void GetStencilDataAsImageData(
extent
[
5
]
=
extent
[
4
];
// Otherwise we cannot write it out as a PNG!
int
extent1
[
6
]
=
{
0
,
50
,
0
,
50
,
0
,
0
};
image
->
SetExtent
(
extent1
);
image
->
SetScalarTypeToUnsignedChar
();
image
->
SetNumberOfScalarComponents
(
3
);
image
->
AllocateScalars
();
image
->
AllocateScalars
(
VTK_UNSIGNED_CHAR
,
3
);
// Fill image with zeroes
for
(
int
y
=
extent1
[
2
];
y
<=
extent1
[
3
];
y
++
)
...
...
@@ -205,7 +203,10 @@ int TestImageStencilData( int argc, char * argv [] )
return
EXIT_FAILURE
;
}
int
retval
=
testing
->
RegressionTest
(
image
,
10
);
vtkSmartPointer
<
vtkTrivialProducer
>
producer
=
vtkSmartPointer
<
vtkTrivialProducer
>::
New
();
producer
->
SetOutput
(
image
);
int
retval
=
testing
->
RegressionTest
(
producer
,
10
);
testing
->
Delete
();
image
->
Delete
();
...
...
Hybrid/vtkAxesActor.cxx
View file @
d10d7093
...
...
@@ -607,10 +607,10 @@ void vtkAxesActor::UpdateProps()
SetInputConnection
(
this
->
UserDefinedTip
->
GetProducerPort
()
);
}
(
vtkPolyDataMapper
::
SafeDownCast
(
this
->
XAxisTip
->
GetMapper
())
)
->
GetInput
()
->
Update
();
(
vtkPolyDataMapper
::
SafeDownCast
(
this
->
XAxisShaft
->
GetMapper
())
)
->
GetInput
()
->
Update
();
vtkPolyDataMapper
::
SafeDownCast
(
this
->
XAxisTip
->
GetMapper
())
->
GetInput
Algorithm
()
->
Update
();
vtkPolyDataMapper
::
SafeDownCast
(
this
->
XAxisShaft
->
GetMapper
())
->
GetInput
Algorithm
()
->
Update
();
if
(
this
->
GetUserTransform
()
)
{
...
...
Hybrid/vtkBarChartActor.cxx
View file @
d10d7093
...
...
@@ -332,8 +332,6 @@ int vtkBarChartActor::BuildPlot(vtkViewport *viewport)
}
// Check modified time to see whether we have to rebuild.
this
->
Input
->
Update
();
if
(
positionsHaveChanged
||
this
->
GetMTime
()
>
this
->
BuildTime
||
this
->
Input
->
GetMTime
()
>
this
->
BuildTime
||
...
...
Hybrid/vtkCaptionActor2D.cxx
View file @
d10d7093
...
...
@@ -396,7 +396,6 @@ int vtkCaptionActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
if
(
this
->
LeaderGlyph
)
{
// compute the scale
this
->
LeaderGlyph
->
Update
();
double
length
=
this
->
LeaderGlyph
->
GetLength
();
int
*
sze
=
viewport
->
GetSize
();
int
numPixels
=
static_cast
<
int
>
(
this
->
LeaderGlyphSize
*
...
...
@@ -433,7 +432,6 @@ int vtkCaptionActor2D::RenderOpaqueGeometry(vtkViewport *viewport)
{
this
->
LeaderMapper2D
->
SetInput
(
this
->
LeaderPolyData
);
this
->
LeaderMapper3D
->
SetInput
(
this
->
LeaderPolyData
);
this
->
LeaderPolyData
->
Update
();
}
// assign properties
...
...
Hybrid/vtkCubeAxesActor2D.cxx
View file @
d10d7093
...
...
@@ -684,7 +684,6 @@ void vtkCubeAxesActor2D::GetBounds(double bounds[6])
if
(
this
->
Input
)
{
this
->
Input
->
Update
();
this
->
Input
->
GetBounds
(
bounds
);
for
(
i
=
0
;
i
<
6
;
i
++
)
{
...
...
Hybrid/vtkGridTransform.cxx
View file @
d10d7093
...
...
@@ -802,10 +802,12 @@ unsigned long vtkGridTransform::GetMTime()
result
=
vtkWarpTransform
::
GetMTime
();
if
(
this
->
DisplacementGrid
)
{
/*
this->DisplacementGrid->UpdateInformation();
mtime = this->DisplacementGrid->GetPipelineMTime();
result = ( mtime > result ? mtime : result );
*/
mtime
=
this
->
DisplacementGrid
->
GetMTime
();
result
=
(
mtime
>
result
?
mtime
:
result
);
...
...
@@ -1227,7 +1229,7 @@ void vtkGridTransform::InternalUpdate()
return
;
}
grid
->
UpdateInformation
();
//
grid->UpdateInformation();
if
(
grid
->
GetNumberOfScalarComponents
()
!=
3
)
{
...
...
@@ -1245,8 +1247,8 @@ void vtkGridTransform::InternalUpdate()
return
;
}
grid
->
SetUpdateExtent
(
grid
->
GetWholeExtent
());
grid
->
Update
();
//
grid->SetUpdateExtent(grid->GetWholeExtent());
//
grid->Update();
this
->
GridPointer
=
grid
->
GetScalarPointer
();
this
->
GridScalarType
=
grid
->
GetScalarType
();
...
...
Hybrid/vtkImageDataLIC2D.cxx
View file @
d10d7093
...
...
@@ -585,8 +585,7 @@ int vtkImageDataLIC2D::RequestData(
// hence we allocate the output using the GPU extent and then crop it.
output
->
SetExtent
(
gpuExtent
);
output
->
SetNumberOfScalarComponents
(
3
);
output
->
AllocateScalars
();
output
->
AllocateScalars
(
VTK_FLOAT
,
3
);
outputBus
->
SetCPUExtent
(
gpuExtent
);
outputBus
->
SetGPUExtent
(
gpuExtent
);
outputBus
->
SetTexture
(
internal
->
GetLIC
());
...
...
@@ -599,7 +598,7 @@ int vtkImageDataLIC2D::RequestData(
noiseBus
->
Delete
();
// Ensures that the output extent is exactly same as what was asked for.
output
->
Crop
();
output
->
Crop
(
outInfo
->
Get
(
vtkStreamingDemandDrivenPipeline
::
UPDATE_EXTENT
())
);
return
1
;
}
...
...
Hybrid/vtkImplicitModeller.cxx
View file @
d10d7093
...
...
@@ -177,7 +177,9 @@ void vtkImplicitModeller::StartAppend(int internal)
// it has been called.
this
->
UpdateInformation
();
}
this
->
GetOutput
()
->
SetUpdateExtent
(
this
->
GetOutput
()
->
GetWholeExtent
());
vtkStreamingDemandDrivenPipeline
::
SetUpdateExtent
(
this
->
GetOutputInformation
(
0
),
vtkStreamingDemandDrivenPipeline
::
GetWholeExtent
(
this
->
GetOutputInformation
(
0
)));
vtkDebugMacro
(
<<
"Initializing data"
);
this
->
AllocateOutputData
(
this
->
GetOutput
());
...
...
Hybrid/vtkLegendBoxActor.cxx
View file @
d10d7093
...
...
@@ -688,7 +688,7 @@ int vtkLegendBoxActor::RenderOpaqueGeometry(vtkViewport *viewport)
if
(
this
->
Symbol
[
i
]
)
//if there is a symbol
{
symbolExists
=
true
;
this
->
Symbol
[
i
]
->
Update
();
//
this->Symbol[i]->Update();
bounds
=
this
->
Symbol
[
i
]
->
GetBounds
();
if
(
(
bounds
[
3
]
-
bounds
[
2
])
==
0.0
)
{
...
...
Hybrid/vtkMNITransformReader.cxx
View file @
d10d7093
...
...
@@ -758,7 +758,7 @@ int vtkMNITransformReader::ReadGridTransform(
}
// Read the minc file now, rather than later
reader
->
GetOutput
()
->
Update
();
reader
->
Update
();
// Create the transform
vtkGridTransform
*
transform
=
vtkGridTransform
::
New
();
...
...
Hybrid/vtkPieChartActor.cxx
View file @
d10d7093
...
...
@@ -327,7 +327,7 @@ int vtkPieChartActor::BuildPlot(vtkViewport *viewport)
}
// Check modified time to see whether we have to rebuild.
this
->
Input
->
Update
();
//
this->Input->Update();