Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

itk::VtkAbstractTransform< TScalarType > Class Template Reference
[Geometry Classes]

Adapter from vtkAbstractTransform to itk::Transform<TScalarType, 3, 3> More...

#include <itkVtkAbstractTransform.h>

Inheritance diagram for itk::VtkAbstractTransform< TScalarType >:
Inheritance graph
[legend]
Collaboration diagram for itk::VtkAbstractTransform< TScalarType >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef VtkAbstractTransform Self
typedef Transform< TScalarType, 3, 3 > Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const SelfConstPointer
typedef Superclass::OutputPointType OutputPointType
typedef
Superclass::OutputVectorType 
OutputVectorType
typedef
Superclass::OutputVnlVectorType 
OutputVnlVectorType
typedef
Superclass::OutputCovariantVectorType 
OutputCovariantVectorType
typedef Superclass::InputPointType InputPointType
typedef Superclass::InputVectorType InputVectorType
typedef
Superclass::InputVnlVectorType 
InputVnlVectorType
typedef
Superclass::InputCovariantVectorType 
InputCovariantVectorType

Public Member Functions

virtual vtkAbstractTransform * GetVtkAbstractTransform () const
 Get the vtkAbstractTransform (stored in m_VtkAbstractTransform)
virtual vtkAbstractTransform * GetInverseVtkAbstractTransform () const
 Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform)
virtual void SetVtkAbstractTransform (vtkAbstractTransform *aVtkAbstractTransform)
 Set the vtkAbstractTransform (stored in m_VtkAbstractTransform)
virtual OutputPointType TransformPoint (const InputPointType &) const
virtual OutputVectorType TransformVector (const InputVectorType &) const
virtual OutputVnlVectorType TransformVector (const InputVnlVectorType &) const
virtual OutputCovariantVectorType TransformCovariantVector (const InputCovariantVectorType &) const
virtual InputPointType BackTransform (const OutputPointType &point) const
virtual InputVectorType BackTransform (const OutputVectorType &vector) const
virtual InputVnlVectorType BackTransform (const OutputVnlVectorType &vector) const
virtual InputCovariantVectorType BackTransform (const OutputCovariantVectorType &vector) const
virtual unsigned long GetMTime () const

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 VtkAbstractTransform ()
virtual ~VtkAbstractTransform ()

Protected Attributes

vtkAbstractTransform * m_VtkAbstractTransform
 Instance of the vtkAbstractTransform.
vtkAbstractTransform * m_InverseVtkAbstractTransform
 Instance of the vtkAbstractTransform.
unsigned long m_LastVtkAbstractTransformTimeStamp

Detailed Description

template<class TScalarType>
class itk::VtkAbstractTransform< TScalarType >

Adapter from vtkAbstractTransform to itk::Transform<TScalarType, 3, 3>

Definition at line 32 of file itkVtkAbstractTransform.h.


Member Typedef Documentation

template<class TScalarType>
typedef SmartPointer<const Self> itk::VtkAbstractTransform< TScalarType >::ConstPointer

Definition at line 38 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::InputCovariantVectorType itk::VtkAbstractTransform< TScalarType >::InputCovariantVectorType

Definition at line 46 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::InputPointType itk::VtkAbstractTransform< TScalarType >::InputPointType

Definition at line 43 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::InputVectorType itk::VtkAbstractTransform< TScalarType >::InputVectorType

Definition at line 44 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::InputVnlVectorType itk::VtkAbstractTransform< TScalarType >::InputVnlVectorType

Definition at line 45 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::OutputCovariantVectorType itk::VtkAbstractTransform< TScalarType >::OutputCovariantVectorType

Definition at line 42 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::OutputPointType itk::VtkAbstractTransform< TScalarType >::OutputPointType

Definition at line 39 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::OutputVectorType itk::VtkAbstractTransform< TScalarType >::OutputVectorType

Definition at line 40 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Superclass::OutputVnlVectorType itk::VtkAbstractTransform< TScalarType >::OutputVnlVectorType

Definition at line 41 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef SmartPointer<Self> itk::VtkAbstractTransform< TScalarType >::Pointer

Definition at line 37 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef VtkAbstractTransform itk::VtkAbstractTransform< TScalarType >::Self

Definition at line 35 of file itkVtkAbstractTransform.h.

template<class TScalarType>
typedef Transform< TScalarType, 3, 3 > itk::VtkAbstractTransform< TScalarType >::Superclass

Definition at line 36 of file itkVtkAbstractTransform.h.


Constructor & Destructor Documentation

template<class TScalarType >
itk::VtkAbstractTransform< TScalarType >::VtkAbstractTransform (  ) [protected]
template<class TScalarType >
itk::VtkAbstractTransform< TScalarType >::~VtkAbstractTransform (  ) [protected, virtual]

Definition at line 34 of file itkVtkAbstractTransform.txx.

{
  if(m_VtkAbstractTransform!=NULL)
    m_VtkAbstractTransform->UnRegister(NULL);
}

Member Function Documentation

template<class TScalarType >
VtkAbstractTransform< TScalarType >::InputPointType itk::VtkAbstractTransform< TScalarType >::BackTransform ( const OutputPointType point ) const [virtual]

Definition at line 151 of file itkVtkAbstractTransform.txx.

{
  assert(m_VtkAbstractTransform!=NULL);

  OutputPointType outputpoint;
  float vtkpt[3];
  mitk::itk2vtk(point, vtkpt);
  m_InverseVtkAbstractTransform->TransformPoint(vtkpt, vtkpt);
  mitk::vtk2itk(vtkpt, outputpoint);
  return outputpoint;
}
template<class TScalarType >
VtkAbstractTransform< TScalarType >::InputVectorType itk::VtkAbstractTransform< TScalarType >::BackTransform ( const OutputVectorType vector ) const [virtual]

Definition at line 167 of file itkVtkAbstractTransform.txx.

{
  assert(m_VtkAbstractTransform!=NULL);

  OutputVectorType outputvector;
  float vtkpt[3]={0,0,0};
  float vtkvec[3];
  mitk::itk2vtk(vect, vtkvec);
  m_InverseVtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
  mitk::vtk2itk(vtkvec, outputvector);
  return outputvector;
}
template<class TScalarType >
VtkAbstractTransform< TScalarType >::InputVnlVectorType itk::VtkAbstractTransform< TScalarType >::BackTransform ( const OutputVnlVectorType vector ) const [virtual]

Definition at line 184 of file itkVtkAbstractTransform.txx.

{
  assert(m_InverseVtkAbstractTransform!=NULL);

  OutputVnlVectorType outputvector;
  float vtkpt[3]={0,0,0};
  float vtkvec[3];
  mitk::itk2vtk(vect, vtkvec);
  m_InverseVtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
  mitk::vtk2itk(vtkvec, outputvector);
  return outputvector;
}
template<class TScalarType >
VtkAbstractTransform< TScalarType >::InputCovariantVectorType itk::VtkAbstractTransform< TScalarType >::BackTransform ( const OutputCovariantVectorType vector ) const [virtual]

Definition at line 201 of file itkVtkAbstractTransform.txx.

{
  itkExceptionMacro( << "implement before using!" );
//  for (unsigned int i = 0; i < NDimensions; i++) 
//    {
//    result[i] = NumericTraits<ScalarType>::Zero;
//    for (unsigned int j = 0; j < NDimensions; j++) 
//      {
//      result[i] += m_Matrix[j][i]*vec[j]; // Direct matrix transposed
//      }
//    }
  return vec;
}
template<class TScalarType >
vtkAbstractTransform * itk::VtkAbstractTransform< TScalarType >::GetInverseVtkAbstractTransform (  ) const [virtual]

Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform)

Definition at line 47 of file itkVtkAbstractTransform.txx.

template<class TScalarType >
unsigned long itk::VtkAbstractTransform< TScalarType >::GetMTime (  ) const [virtual]
template<class TScalarType >
vtkAbstractTransform * itk::VtkAbstractTransform< TScalarType >::GetVtkAbstractTransform (  ) const [virtual]

Get the vtkAbstractTransform (stored in m_VtkAbstractTransform)

Definition at line 41 of file itkVtkAbstractTransform.txx.

template<class TScalarType>
static Pointer itk::VtkAbstractTransform< TScalarType >::New (  ) [static]
template<class TScalarType >
void itk::VtkAbstractTransform< TScalarType >::SetVtkAbstractTransform ( vtkAbstractTransform *  aVtkAbstractTransform ) [virtual]

Set the vtkAbstractTransform (stored in m_VtkAbstractTransform)

Definition at line 53 of file itkVtkAbstractTransform.txx.

References itk::VtkAbstractTransform< TScalarType >::GetMTime().

{
  if(m_VtkAbstractTransform==aVtkAbstractTransform)
    return;

  if(m_VtkAbstractTransform!=NULL)
    m_VtkAbstractTransform->UnRegister(NULL);

  m_VtkAbstractTransform=aVtkAbstractTransform;
  if(m_VtkAbstractTransform!=NULL)
  {
    m_VtkAbstractTransform->Register(NULL);
    m_InverseVtkAbstractTransform=m_VtkAbstractTransform->GetInverse(); // memory managed by m_VtkAbstractTransform
  }

  m_LastVtkAbstractTransformTimeStamp = m_VtkAbstractTransform->GetMTime();

  this->Modified();
}
template<class TScalarType >
itk::VtkAbstractTransform< TScalarType >::OutputCovariantVectorType itk::VtkAbstractTransform< TScalarType >::TransformCovariantVector ( const InputCovariantVectorType  ) const [virtual]

Definition at line 131 of file itkVtkAbstractTransform.txx.

{
  itkExceptionMacro( << "implement before using!" );
  OutputCovariantVectorType  result;    // Converted vector

//  for (unsigned int i = 0; i < NDimensions; i++) 
//    {
//    result[i] = NumericTraits<ScalarType>::Zero;
//    for (unsigned int j = 0; j < NDimensions; j++) 
//      {
//      result[i] += m_Inverse[j][i]*vec[j]; // Inverse transposed
//      }
//    }
  return result;
}
template<class TScalarType >
itk::VtkAbstractTransform< TScalarType >::OutputPointType itk::VtkAbstractTransform< TScalarType >::TransformPoint ( const InputPointType point ) const [virtual]

Definition at line 77 of file itkVtkAbstractTransform.txx.

{
  assert(m_VtkAbstractTransform!=NULL);

  OutputPointType outputpoint;
  vnl_vector<TScalarType> vnl_vec;
  float vtkpt[3];
  mitk::itk2vtk(point, vtkpt);
  m_VtkAbstractTransform->TransformPoint(vtkpt, vtkpt);
  mitk::vtk2itk(vtkpt, outputpoint);
  return outputpoint;
}
template<class TScalarType >
itk::VtkAbstractTransform< TScalarType >::OutputVectorType itk::VtkAbstractTransform< TScalarType >::TransformVector ( const InputVectorType vect ) const [virtual]

Definition at line 95 of file itkVtkAbstractTransform.txx.

{
  assert(m_VtkAbstractTransform!=NULL);

  OutputVectorType outputvector;
  vnl_vector<TScalarType> vnl_vec;
  float vtkpt[3]={0,0,0};
  float vtkvec[3];
  mitk::vnl2vtk<TScalarType, float>(vect.Get_vnl_vector(), vtkvec);
  m_VtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
  mitk::vtk2itk(vtkvec, outputvector);
  return outputvector;
}
template<class TScalarType >
itk::VtkAbstractTransform< TScalarType >::OutputVnlVectorType itk::VtkAbstractTransform< TScalarType >::TransformVector ( const InputVnlVectorType vect ) const [virtual]

Definition at line 114 of file itkVtkAbstractTransform.txx.

{
  assert(m_VtkAbstractTransform!=NULL);

  OutputVnlVectorType outputvector;
  float vtkpt[3]={0,0,0};
  float vtkvec[3];
  mitk::vnl2vtk<TScalarType, float>(vect, vtkvec);
  m_VtkAbstractTransform->TransformVectorAtPoint(vtkpt, vtkvec, vtkvec);
  mitk::vtk2itk(vtkvec, outputvector);
  return outputvector;
}

Member Data Documentation

template<class TScalarType>
vtkAbstractTransform* itk::VtkAbstractTransform< TScalarType >::m_InverseVtkAbstractTransform [protected]

Instance of the vtkAbstractTransform.

Definition at line 84 of file itkVtkAbstractTransform.h.

template<class TScalarType>
unsigned long itk::VtkAbstractTransform< TScalarType >::m_LastVtkAbstractTransformTimeStamp [mutable, protected]

Definition at line 86 of file itkVtkAbstractTransform.h.

template<class TScalarType>
vtkAbstractTransform* itk::VtkAbstractTransform< TScalarType >::m_VtkAbstractTransform [protected]

Instance of the vtkAbstractTransform.

Definition at line 80 of file itkVtkAbstractTransform.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines