10 template <
typename TImageType,
typename TInterpolatorPrecisionType>
15 return m_ReferenceOutputModel->GetSize();
22 template <
typename TImageType,
typename TInterpolatorPrecisionType>
23 itk::LightObject::Pointer
27 itk::LightObject::Pointer outputPointer = Superclass::InternalClone();
29 Self *castPointer = dynamic_cast <
Self *> (outputPointer.GetPointer());
31 if (m_ReferenceOutputModel)
37 template <
typename TImageType,
typename TInterpolatorPrecisionType>
42 m_WorkModels.resize(this->GetNumberOfWorkUnits());
43 for (
unsigned int i = 0;i < this->GetNumberOfWorkUnits();++i)
44 m_WorkModels[i] = m_ReferenceOutputModel->Clone();
47 output->SetDescriptionModel(m_ReferenceOutputModel);
48 output->SetVectorLength(m_ReferenceOutputModel->GetSize());
50 this->Superclass::BeforeThreadedGenerateData();
53 template <
typename TImageType,
typename TInterpolatorPrecisionType>
58 m_ReferenceOutputModel = model->Clone();
61 template <
typename TImageType,
typename TInterpolatorPrecisionType>
68 typename InterpolatorType::Pointer tmpInterpolator = InterpolatorType::New();
69 tmpInterpolator->SetReferenceOutputModel(m_ReferenceOutputModel);
70 this->SetInterpolator(tmpInterpolator.GetPointer());
73 template <
typename TImageType,
typename TInterpolatorPrecisionType>
79 m_WorkModels[threadId]->SetModelVector(interpolatedModel);
81 m_WorkModels[threadId]->Reorient(modelOrientationMatrix,(!this->GetFiniteStrainReorientation()));
82 orientedModel = m_WorkModels[threadId]->GetModelVector();
virtual void ReorientInterpolatedModel(const InputPixelType &interpolatedModel, vnl_matrix< double > &modelOrientationMatrix, InputPixelType &orientedModel, itk::ThreadIdType threadId) ITK_OVERRIDE
Needs to be implemented in sub-classes, does the actual re-orientation of the model.
virtual unsigned int GetOutputVectorLength() ITK_OVERRIDE
virtual void BeforeThreadedGenerateData() ITK_OVERRIDE
MCModelType::Pointer MCModelPointer
Superclass::InputImageType InputImageType
void SetReferenceOutputModel(const MCModelPointer &model)
Sets reference output MCM model, necessary to determine output organization (and rotate) ...
itk::InterpolateImageFunction< InputImageType, TInterpolatorPrecisionType > InterpolatorType
Superclass::InputPixelType InputPixelType
virtual itk::LightObject::Pointer InternalClone() const ITK_OVERRIDE
virtual void InitializeInterpolator() ITK_OVERRIDE
Initializes the default interpolator, might change in derived classes.