Commit 4879cb7e authored by Ken Martin's avatar Ken Martin
Browse files

ENH: removed GetPipelineBlah methods

parent ea860bf0
......@@ -42,7 +42,7 @@
#include "vtkVoxel.h"
#include "vtkInformationVector.h"
vtkCxxRevisionMacro(vtkImageData, "1.8");
vtkCxxRevisionMacro(vtkImageData, "1.9");
vtkStandardNewMacro(vtkImageData);
//----------------------------------------------------------------------------
......@@ -233,9 +233,9 @@ void vtkImageData::CopyTypeSpecificInformation( vtkDataObject *data )
// Now do the specific stuff
this->SetOrigin( image->GetOrigin() );
this->SetSpacing( image->GetSpacing() );
this->SetScalarType( image->GetPipelineScalarType() );
this->SetScalarType( image->GetScalarType() );
this->SetNumberOfScalarComponents(
image->GetPipelineNumberOfScalarComponents() );
image->GetNumberOfScalarComponents() );
}
//----------------------------------------------------------------------------
......@@ -1199,17 +1199,6 @@ void vtkImageData::SetNumberOfScalarComponents(int num)
//----------------------------------------------------------------------------
int vtkImageData::GetNumberOfScalarComponents()
{
vtkDataArray *scalars = this->GetPointData()->GetScalars();
if (scalars)
{
return scalars->GetNumberOfComponents();
}
return 1;
}
//----------------------------------------------------------------------------
int vtkImageData::GetPipelineNumberOfScalarComponents()
{
this->GetProducerPort();
if(vtkInformation* info = this->GetPipelineInformation())
......@@ -1513,17 +1502,6 @@ void vtkImageData::SetScalarType(int type)
//----------------------------------------------------------------------------
int vtkImageData::GetScalarType()
{
vtkDataArray *scalars = this->GetPointData()->GetScalars();
if (scalars)
{
return scalars->GetDataType();
}
return VTK_DOUBLE;
}
//----------------------------------------------------------------------------
int vtkImageData::GetPipelineScalarType()
{
this->GetProducerPort();
if(vtkInformation* info = this->GetPipelineInformation())
......
......@@ -268,14 +268,6 @@ public:
int GetScalarType();
const char* GetScalarTypeAsString() { return vtkImageScalarTypeNameMacro ( this->GetScalarType() ); };
// Description:
// Get the pipeline scalar type
int GetPipelineScalarType();
// Description:
// Get the pipeline number of scalar components for points.
int GetPipelineNumberOfScalarComponents();
// Description:
// Set/Get the number of scalar components for points.
void SetNumberOfScalarComponents( int n );
......
......@@ -20,7 +20,7 @@
#include "math.h"
vtkCxxRevisionMacro(vtkGridTransform, "1.27");
vtkCxxRevisionMacro(vtkGridTransform, "1.28");
vtkStandardNewMacro(vtkGridTransform);
vtkCxxSetObjectMacro(vtkGridTransform,DisplacementGrid,vtkImageData);
......@@ -1197,17 +1197,17 @@ void vtkGridTransform::InternalUpdate()
grid->UpdateInformation();
if (grid->GetPipelineNumberOfScalarComponents() != 3)
if (grid->GetNumberOfScalarComponents() != 3)
{
vtkErrorMacro(<< "TransformPoint: displacement grid must have 3 components");
return;
}
if (grid->GetPipelineScalarType() != VTK_CHAR &&
grid->GetPipelineScalarType() != VTK_UNSIGNED_CHAR &&
grid->GetPipelineScalarType() != VTK_SHORT &&
grid->GetPipelineScalarType() != VTK_UNSIGNED_SHORT &&
grid->GetPipelineScalarType() != VTK_FLOAT &&
grid->GetPipelineScalarType() != VTK_DOUBLE)
if (grid->GetScalarType() != VTK_CHAR &&
grid->GetScalarType() != VTK_UNSIGNED_CHAR &&
grid->GetScalarType() != VTK_SHORT &&
grid->GetScalarType() != VTK_UNSIGNED_SHORT &&
grid->GetScalarType() != VTK_FLOAT &&
grid->GetScalarType() != VTK_DOUBLE)
{
vtkErrorMacro(<< "TransformPoint: displacement grid is of unsupported numerical type");
return;
......@@ -1217,7 +1217,7 @@ void vtkGridTransform::InternalUpdate()
grid->Update();
this->GridPointer = grid->GetScalarPointer();
this->GridScalarType = grid->GetPipelineScalarType();
this->GridScalarType = grid->GetScalarType();
grid->GetSpacing(this->GridSpacing);
grid->GetOrigin(this->GridOrigin);
......
......@@ -20,7 +20,7 @@
#include <ctype.h>
#include <string.h>
vtkCxxRevisionMacro(vtkImageExport, "1.30");
vtkCxxRevisionMacro(vtkImageExport, "1.31");
vtkStandardNewMacro(vtkImageExport);
//----------------------------------------------------------------------------
......@@ -71,7 +71,7 @@ int vtkImageExport::GetDataMemorySize()
input->UpdateInformation();
int *extent = input->GetWholeExtent();
int size = input->GetScalarSize();
size *= input->GetPipelineNumberOfScalarComponents();
size *= input->GetNumberOfScalarComponents();
size *= (extent[1] - extent[0] + 1);
size *= (extent[3] - extent[2] + 1);
size *= (extent[5] - extent[4] + 1);
......@@ -395,7 +395,7 @@ const char* vtkImageExport::ScalarTypeCallback()
return "unsigned char";
}
switch (this->GetInput()->GetPipelineScalarType())
switch (this->GetInput()->GetScalarType())
{
case VTK_DOUBLE:
{ return "double"; }
......@@ -430,7 +430,7 @@ int vtkImageExport::NumberOfComponentsCallback()
}
else
{
return this->GetInput()->GetPipelineNumberOfScalarComponents();
return this->GetInput()->GetNumberOfScalarComponents();
}
}
......@@ -482,7 +482,7 @@ int vtkImageExport::GetDataNumberOfScalarComponents()
return 1;
}
this->GetInput()->UpdateInformation();
return this->GetInput()->GetPipelineNumberOfScalarComponents();
return this->GetInput()->GetNumberOfScalarComponents();
}
int vtkImageExport::GetDataScalarType()
......@@ -492,7 +492,7 @@ int vtkImageExport::GetDataScalarType()
return VTK_UNSIGNED_CHAR;
}
this->GetInput()->UpdateInformation();
return this->GetInput()->GetPipelineScalarType();
return this->GetInput()->GetScalarType();
}
int *vtkImageExport::GetDataExtent()
......
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