#include <mitkContour.h>
Public Types | |
typedef Contour | Self |
typedef BaseData | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
typedef itk::PolyLineParametricPath< 3 > | PathType |
typedef PathType::Pointer | PathPointer |
typedef PathType::ContinuousIndexType | ContinuousIndexType |
typedef PathType::InputType | InputType |
typedef PathType::OutputType | OutputType |
typedef PathType::OffsetType | OffsetType |
typedef itk::BoundingBox < unsigned long, 3, ScalarType > | BoundingBoxType |
typedef BoundingBoxType::PointsContainer | PointsContainer |
typedef BoundingBoxType::PointsContainer::Pointer | PointsContainerPointer |
typedef BoundingBoxType::PointsContainerIterator | PointsContainerIterator |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual void | SetClosed (bool _arg) |
virtual bool | GetClosed () |
virtual void | SetSelected (bool _arg) |
virtual bool | GetSelected () |
virtual void | SetWidth (float _arg) |
virtual float | GetWidth () |
void | Initialize () |
void | AddVertex (mitk::Point3D newPoint) |
PathPointer | GetContourPath () const |
void | SetCurrentWindow (vtkRenderWindow *rw) |
vtkRenderWindow * | GetCurrentWindow () const |
unsigned int | GetNumberOfPoints () const |
PointsContainerPointer | GetPoints () const |
void | SetPoints (PointsContainerPointer points) |
virtual void | UpdateOutputInformation () |
virtual void | SetRequestedRegionToLargestPossibleRegion () |
virtual bool | RequestedRegionIsOutsideOfTheBufferedRegion () |
virtual bool | VerifyRequestedRegion () |
virtual void | SetRequestedRegion (itk::DataObject *data) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
Contour () | |
virtual | ~Contour () |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
This class holds stores vertices for drawing a contour
Definition at line 36 of file mitkContour.h.
typedef itk::BoundingBox<unsigned long, 3, ScalarType> mitk::Contour::BoundingBoxType |
Definition at line 49 of file mitkContour.h.
typedef itk::SmartPointer<const Self> mitk::Contour::ConstPointer |
Reimplemented from mitk::BaseData.
Definition at line 39 of file mitkContour.h.
typedef PathType::ContinuousIndexType mitk::Contour::ContinuousIndexType |
Definition at line 45 of file mitkContour.h.
typedef PathType::InputType mitk::Contour::InputType |
Definition at line 46 of file mitkContour.h.
typedef PathType::OffsetType mitk::Contour::OffsetType |
Definition at line 48 of file mitkContour.h.
typedef PathType::OutputType mitk::Contour::OutputType |
Definition at line 47 of file mitkContour.h.
typedef PathType::Pointer mitk::Contour::PathPointer |
Definition at line 44 of file mitkContour.h.
typedef itk::PolyLineParametricPath<3> mitk::Contour::PathType |
Definition at line 41 of file mitkContour.h.
typedef itk::SmartPointer<Self> mitk::Contour::Pointer |
Reimplemented from mitk::BaseData.
Definition at line 39 of file mitkContour.h.
typedef BoundingBoxType::PointsContainer mitk::Contour::PointsContainer |
Definition at line 50 of file mitkContour.h.
typedef BoundingBoxType::PointsContainerIterator mitk::Contour::PointsContainerIterator |
Definition at line 52 of file mitkContour.h.
typedef BoundingBoxType::PointsContainer::Pointer mitk::Contour::PointsContainerPointer |
Definition at line 51 of file mitkContour.h.
typedef Contour mitk::Contour::Self |
Reimplemented from mitk::BaseData.
Definition at line 39 of file mitkContour.h.
typedef BaseData mitk::Contour::Superclass |
Reimplemented from mitk::BaseData.
Definition at line 39 of file mitkContour.h.
mitk::Contour::Contour | ( | ) | [protected] |
Definition at line 21 of file mitkContour.cpp.
References mitk::BaseData::InitializeTimeSlicedGeometry().
: m_ContourPath (PathType::New()), m_CurrentWindow ( NULL ), m_BoundingBox (BoundingBoxType::New()), m_Vertices ( BoundingBoxType::PointsContainer::New() ), m_Closed ( true ), m_Selected ( false ), m_Width (3.0) { Superclass::InitializeTimeSlicedGeometry(); }
mitk::Contour::~Contour | ( | ) | [protected, virtual] |
Definition at line 33 of file mitkContour.cpp.
{ }
void mitk::Contour::AddVertex | ( | mitk::Point3D | newPoint ) |
add a new vertex to the contour
Definition at line 37 of file mitkContour.cpp.
Referenced by mitk::ContourInteractor::Move(), mitk::CorrectorTool2D::OnMouseMoved(), mitk::ContourTool::OnMouseMoved(), mitk::CorrectorTool2D::OnMousePressed(), mitk::ContourTool::OnMousePressed(), and mitk::ContourInteractor::Press().
{ BoundingBoxType::PointType p; p.CastFrom(newPoint); m_Vertices->InsertElement(m_Vertices->Size(), p); ContinuousIndexType idx; idx.CastFrom(newPoint); m_ContourPath->AddVertex(idx); m_BoundingBox->SetPoints(m_Vertices); Modified(); }
virtual const char* mitk::Contour::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BaseData.
virtual bool mitk::Contour::GetClosed | ( | ) | [virtual] |
returns if the contour is closed or opened
Referenced by mitk::ContourSetVtkMapper3D::GenerateData().
mitk::Contour::PathType::Pointer mitk::Contour::GetContourPath | ( | ) | const |
return an itk parametric path of the contour
Definition at line 95 of file mitkContour.cpp.
Referenced by mitk::ContourUtils::BackProjectContourFrom2DSlice(), mitk::ContourUtils::FillContourInSlice(), mitk::ContourSetVtkMapper3D::GenerateData(), mitk::ContourSetToPointSetFilter::GenerateData(), and mitk::ContourUtils::ProjectContourTo2DSlice().
{
return m_ContourPath;
}
vtkRenderWindow * mitk::Contour::GetCurrentWindow | ( | ) | const |
returns the points to the current render window
Definition at line 105 of file mitkContour.cpp.
{
return m_CurrentWindow;
}
unsigned int mitk::Contour::GetNumberOfPoints | ( | ) | const |
returns the number of points stored in the contour
Definition at line 119 of file mitkContour.cpp.
Referenced by mitk::ContourUtils::FillContourInSlice().
{
return m_Vertices->Size();
}
mitk::Contour::PointsContainerPointer mitk::Contour::GetPoints | ( | ) | const |
returns the container of the contour points
Definition at line 125 of file mitkContour.cpp.
Referenced by mitk::ContourSetVtkMapper3D::GenerateData().
{
return m_Vertices;
}
virtual bool mitk::Contour::GetSelected | ( | ) | [virtual] |
virtual float mitk::Contour::GetWidth | ( | ) | [virtual] |
void mitk::Contour::Initialize | ( | void | ) |
clean up the contour data
Definition at line 110 of file mitkContour.cpp.
Referenced by mitk::CorrectorTool2D::OnMousePressed(), mitk::ContourTool::OnMousePressed(), and mitk::ContourInteractor::Press().
{ m_ContourPath = PathType::New(); m_ContourPath->Initialize(); m_BoundingBox = BoundingBoxType::New(); m_Vertices = BoundingBoxType::PointsContainer::New(); GetTimeSlicedGeometry()->Initialize(1); }
static Pointer mitk::Contour::New | ( | ) | [static] |
Referenced by mitk::ContourUtils::BackProjectContourFrom2DSlice(), mitkContourMapper2DTest(), mitkContourTest(), mitk::PaintbrushTool::OnMouseMoved(), mitk::SetRegionTool::OnMousePressed(), mitk::RegionGrowingTool::OnMousePressedInside(), mitk::RegionGrowingTool::PerformRegionGrowingAndUpdateContour(), mitk::ContourUtils::ProjectContourTo2DSlice(), mitkDataNodeExtTestClass::TestDataSetting(), mitk::CorrectorAlgorithm::TobiasHeimannCorrectionAlgorithm(), and mitk::PaintbrushTool::UpdateContour().
void mitk::Contour::PrintSelf | ( | std::ostream & | os, |
itk::Indent | indent | ||
) | const [protected, virtual] |
Reimplemented from mitk::BaseData.
Definition at line 136 of file mitkContour.cpp.
{ Superclass::PrintSelf( os, indent ); os << indent << "Number of verticies: " << GetNumberOfPoints() << std::endl; mitk::Contour::PointsContainerIterator pointsIt = m_Vertices->Begin(), end = m_Vertices->End(); os << indent << "Verticies: " << std::endl; int i = 0; while ( pointsIt != end ) { os << indent << indent << i << ": " << pointsIt.Value() << std::endl; ++pointsIt; ++i; } }
bool mitk::Contour::RequestedRegionIsOutsideOfTheBufferedRegion | ( | ) | [virtual] |
intherited from parent
Implements mitk::BaseData.
Definition at line 81 of file mitkContour.cpp.
{ return false; }
virtual void mitk::Contour::SetClosed | ( | bool | _arg ) | [virtual] |
sets whether the contour should be closed or open. by default the contour is closed
Referenced by mitk::CorrectorTool2D::CorrectorTool2D().
void mitk::Contour::SetCurrentWindow | ( | vtkRenderWindow * | rw ) |
set the current render window. This is helpful if one wants to draw the contour in one special window only.
Definition at line 100 of file mitkContour.cpp.
{ m_CurrentWindow = rw; }
void mitk::Contour::SetPoints | ( | PointsContainerPointer | points ) |
set the contour points container.
Definition at line 130 of file mitkContour.cpp.
{ m_Vertices = points; Modified(); }
void mitk::Contour::SetRequestedRegion | ( | itk::DataObject * | data ) | [virtual] |
intherited from parent
Implements mitk::BaseData.
Definition at line 91 of file mitkContour.cpp.
{ }
void mitk::Contour::SetRequestedRegionToLargestPossibleRegion | ( | ) | [virtual] |
intherited from parent
Implements mitk::BaseData.
Definition at line 77 of file mitkContour.cpp.
{ }
virtual void mitk::Contour::SetSelected | ( | bool | _arg ) | [virtual] |
virtual void mitk::Contour::SetWidth | ( | float | _arg ) | [virtual] |
void mitk::Contour::UpdateOutputInformation | ( | ) | [virtual] |
intherited from parent
Reimplemented from mitk::BaseData.
Definition at line 49 of file mitkContour.cpp.
References mitk::Geometry3D::SetBounds().
{ // \todo probably we should do this additionally for each time-step float mitkBounds[6]; if (m_Vertices->Size() == 0) { mitkBounds[0] = 0.0; mitkBounds[1] = 0.0; mitkBounds[2] = 0.0; mitkBounds[3] = 0.0; mitkBounds[4] = 0.0; mitkBounds[5] = 0.0; } else { m_BoundingBox->ComputeBoundingBox(); BoundingBoxType::BoundsArrayType tmp = m_BoundingBox->GetBounds(); mitkBounds[0] = tmp[0]; mitkBounds[1] = tmp[1]; mitkBounds[2] = tmp[2]; mitkBounds[3] = tmp[3]; mitkBounds[4] = tmp[4]; mitkBounds[5] = tmp[5]; } Geometry3D* geometry3d = GetGeometry(0); geometry3d->SetBounds(mitkBounds); GetTimeSlicedGeometry()->UpdateInformation(); }
bool mitk::Contour::VerifyRequestedRegion | ( | ) | [virtual] |
intherited from parent
Implements mitk::BaseData.
Definition at line 86 of file mitkContour.cpp.
{ return true; }