int i,j;
int ext[6];
int dim[3];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
image->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ image->GetExtent(ext);
+#endif
dim[0]=ext[1]-ext[0]+1;
dim[1]=ext[3]-ext[2]+1;
{
for (j=0 ; j<dim[1] ; j++)
{
- image->SetScalarComponentFromDouble (i, j, 0 , 0, 0.0);
- image->SetScalarComponentFromDouble (i, j, dim[2]-1, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+j, ext[4]+0 , 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+j, ext[4]+dim[2]-1, 0, 0.0);
} // for j
}// for i
{
for (j=0 ; j<dim[2] ; j++)
{
- image->SetScalarComponentFromDouble (0 , i, j, 0, 0.0);
- image->SetScalarComponentFromDouble (dim[0]-1 , i, j, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+0 , ext[2]+i, ext[4]+j, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+dim[0]-1 , ext[2]+i, ext[4]+j, 0, 0.0);
} // for j
} // for i
{
for (j=0 ; j<dim[2] ; j++)
{
- image->SetScalarComponentFromDouble (i, 0 , j, 0, 0.0);
- image->SetScalarComponentFromDouble (i, dim[1]-1 , j, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+0 , ext[4]+j, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+dim[1]-1 , ext[4]+j, 0, 0.0);
} // for j
}// for i
} // if In
//----------------------------------------------------------------------
void CleanExternalPlane::CleanTypeB()
{
-
int ext[6];
int dimA[3];
int dimB[3];
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
bbGetInputIn()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ bbGetInputIn()->GetExtent(ext);
+#endif
dimA[0] = ext[1]-ext[0]+1;
dimA[1] = ext[3]-ext[2]+1;
imageoutput->Initialize();
- imageoutput->SetScalarType( bbGetInputIn()->GetScalarType() );
imageoutput->SetSpacing( bbGetInputIn()->GetSpacing() );
imageoutput->SetDimensions( dimB[0], dimB[1], dimB[2] );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
+ imageoutput->SetScalarType( bbGetInputIn()->GetScalarType() );
imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ imageoutput->AllocateScalars( bbGetInputIn()->GetScalarType() , 1);
+#endif
int j,k;
for (k=0;k<dimA[2];k++)
{
memcpy( imageoutput->GetScalarPointer(1,j+1,k+1) , bbGetInputIn()->GetScalarPointer(0,j,k) , sizeBlock );
- }
- }
+ } // for k
+ } // for j
+
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5)
imageoutput->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6)
+ // ..
+#endif
+
imageoutput->Modified();
}