本文整理汇总了C++中affinetransform3d::Pointer::SetIdentity方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::SetIdentity方法的具体用法?C++ Pointer::SetIdentity怎么用?C++ Pointer::SetIdentity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类affinetransform3d::Pointer
的用法示例。
在下文中一共展示了Pointer::SetIdentity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vnlmatrix
void
PlaneGeometry::InitializeStandardPlane( mitk::ScalarType width,
ScalarType height, const Vector3D & spacing,
PlaneGeometry::PlaneOrientation planeorientation,
ScalarType zPosition, bool frontside, bool rotated )
{
AffineTransform3D::Pointer transform;
transform = AffineTransform3D::New();
AffineTransform3D::MatrixType matrix;
AffineTransform3D::MatrixType::InternalMatrixType &vnlmatrix = matrix.GetVnlMatrix();
vnlmatrix.set_identity();
vnlmatrix(0,0) = spacing[0];
vnlmatrix(1,1) = spacing[1];
vnlmatrix(2,2) = spacing[2];
transform->SetIdentity();
transform->SetMatrix(matrix);
InitializeStandardPlane(width, height, transform.GetPointer(), planeorientation, zPosition, frontside, rotated);
}
示例2: GenerateData
void HeightFieldSurfaceClipImageFilter::GenerateData()
{
const Image *inputImage = this->GetInput(0);
const Image *outputImage = this->GetOutput();
m_InputTimeSelector->SetInput(inputImage);
m_OutputTimeSelector->SetInput(outputImage);
Image::RegionType outputRegion = outputImage->GetRequestedRegion();
const TimeGeometry *outputTimeGeometry = outputImage->GetTimeGeometry();
const TimeGeometry *inputTimeGeometry = inputImage->GetTimeGeometry();
ScalarType timeInMS;
int timestep = 0;
int tstart = outputRegion.GetIndex(3);
int tmax = tstart + outputRegion.GetSize(3);
for (unsigned int i = 1; i < this->GetNumberOfInputs(); ++i)
{
Surface *inputSurface = const_cast<Surface *>(dynamic_cast<Surface *>(itk::ProcessObject::GetInput(i)));
if (!outputImage->IsInitialized() || inputSurface == nullptr)
return;
MITK_INFO << "Plane: " << i;
MITK_INFO << "Clipping: Start\n";
// const PlaneGeometry *clippingGeometryOfCurrentTimeStep = nullptr;
int t;
for (t = tstart; t < tmax; ++t)
{
timeInMS = outputTimeGeometry->TimeStepToTimePoint(t);
timestep = inputTimeGeometry->TimePointToTimeStep(timeInMS);
m_InputTimeSelector->SetTimeNr(timestep);
m_InputTimeSelector->UpdateLargestPossibleRegion();
m_OutputTimeSelector->SetTimeNr(t);
m_OutputTimeSelector->UpdateLargestPossibleRegion();
// Compose IndexToWorld transform of image with WorldToIndexTransform of
// clipping data for conversion from image index space to plane index space
AffineTransform3D::Pointer planeWorldToIndexTransform = AffineTransform3D::New();
inputSurface->GetGeometry(t)->GetIndexToWorldTransform()->GetInverse(planeWorldToIndexTransform);
AffineTransform3D::Pointer imageToPlaneTransform = AffineTransform3D::New();
imageToPlaneTransform->SetIdentity();
imageToPlaneTransform->Compose(inputTimeGeometry->GetGeometryForTimeStep(t)->GetIndexToWorldTransform());
imageToPlaneTransform->Compose(planeWorldToIndexTransform);
MITK_INFO << "Accessing ITK function...\n";
if (i == 1)
{
AccessByItk_3(m_InputTimeSelector->GetOutput(),
_InternalComputeClippedImage,
this,
inputSurface->GetVtkPolyData(t),
imageToPlaneTransform);
}
else
{
mitk::Image::Pointer extensionImage = m_OutputTimeSelector->GetOutput()->Clone();
AccessByItk_3(
extensionImage, _InternalComputeClippedImage, this, inputSurface->GetVtkPolyData(t), imageToPlaneTransform);
}
if (m_ClippingMode == CLIPPING_MODE_MULTIPLANE)
m_MultiPlaneValue = m_MultiPlaneValue * 2;
}
}
m_TimeOfHeaderInitialization.Modified();
}