Transforms a surface object from index to world coordinates. Transposes the surface point coordinates with the object's mitk::Geometry3D to display correct scene coordinates. More...
#include <mitkSurfaceIndexToWorldTransformFilter.h>
Public Types | |
typedef SurfaceIndexToWorldTransformFilter | Self |
typedef SurfaceToSurfaceFilter | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
SurfaceIndexToWorldTransformFilter () | |
virtual | ~SurfaceIndexToWorldTransformFilter () |
virtual void | GenerateData () |
Transforms a surface object from index to world coordinates. Transposes the surface point coordinates with the object's mitk::Geometry3D to display correct scene coordinates.
Definition at line 35 of file mitkSurfaceIndexToWorldTransformFilter.h.
typedef itk::SmartPointer<const Self> mitk::SurfaceIndexToWorldTransformFilter::ConstPointer |
Definition at line 42 of file mitkSurfaceIndexToWorldTransformFilter.h.
typedef itk::SmartPointer<Self> mitk::SurfaceIndexToWorldTransformFilter::Pointer |
Definition at line 42 of file mitkSurfaceIndexToWorldTransformFilter.h.
Standard mitk class macro
Definition at line 42 of file mitkSurfaceIndexToWorldTransformFilter.h.
Definition at line 42 of file mitkSurfaceIndexToWorldTransformFilter.h.
mitk::SurfaceIndexToWorldTransformFilter::SurfaceIndexToWorldTransformFilter | ( | ) | [protected] |
Protected constructor. Use New instead()
Definition at line 23 of file mitkSurfaceIndexToWorldTransformFilter.cpp.
{ }
mitk::SurfaceIndexToWorldTransformFilter::~SurfaceIndexToWorldTransformFilter | ( | ) | [protected, virtual] |
Protected destructor. Instances are destroyed when reference count is zero
Definition at line 27 of file mitkSurfaceIndexToWorldTransformFilter.cpp.
{ }
void mitk::SurfaceIndexToWorldTransformFilter::GenerateData | ( | ) | [protected, virtual] |
method executed when calling Update();
Definition at line 31 of file mitkSurfaceIndexToWorldTransformFilter.cpp.
References mitk::BaseData::GetGeometry(), mitk::Surface::GetVtkPolyData(), and mitk::Geometry3D::IndexToWorld().
{ mitk::Surface* input = const_cast<mitk::Surface*>( this->GetInput()); mitk::Surface::Pointer output = this->GetOutput(); mitk::Point3D current, transformed; vtkPoints* surfacePoints = vtkPoints::New(); vtkPoints* newSurfacePoints = vtkPoints::New(); int pointIter = 0; surfacePoints = input->GetVtkPolyData()->GetPoints(); while(pointIter != surfacePoints->GetNumberOfPoints()) { double* intermed = surfacePoints->GetPoint(pointIter); current[0] = intermed[0]; current[1] = intermed[1]; current[2] = intermed[2]; input->GetGeometry()->IndexToWorld(current, transformed); newSurfacePoints->InsertPoint( pointIter, transformed[0], transformed[1], transformed[2] ); pointIter++; } output->GetVtkPolyData()->SetPoints(newSurfacePoints); output->GetVtkPolyData()->SetPolys(input->GetVtkPolyData()->GetPolys()); output->GetGeometry()->SetIdentity(); output->Modified(); output->Update(); }
virtual const char* mitk::SurfaceIndexToWorldTransformFilter::GetClassName | ( | ) | const [virtual] |
static Pointer mitk::SurfaceIndexToWorldTransformFilter::New | ( | ) | [static] |
Reimplemented from mitk::SurfaceToSurfaceFilter.