Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Filter for clipping an image with an height-field represented by an mitk::Surface. More...
#include <mitkHeightFieldSurfaceClipImageFilter.h>
Public Member Functions | |
mitkClassMacro (HeightFieldSurfaceClipImageFilter, ImageToImageFilter) | |
Pointer | Clone () const |
void | SetClippingSurface (Surface *clippingSurface) |
Set/Get the surface defining a height field as a triangle mesh. More... | |
void | SetClippingSurfaces (ClippingPlaneList planeList) |
Set/Get the surfaces defining a height field as a triangle mesh. More... | |
const Surface * | GetClippingSurface () const |
Set/Get the surface defining a height field as a triangle mesh. More... | |
void | SetClippingMode (int mode) |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor. More... | |
int | GetClippingMode () |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor. More... | |
void | SetClippingModeToConstant () |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor. More... | |
void | SetClippingModeToMultiplyByFactor () |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor. More... | |
void | SetClippingModeToMultiPlaneValue () |
virtual void | SetClippingConstant (ScalarType _arg) |
Set/Get constant gray-value for clipping in CONSTANT mode. More... | |
virtual ScalarType | GetClippingConstant () const |
Set/Get constant gray-value for clipping in CONSTANT mode. More... | |
virtual void | SetMultiplicationFactor (ScalarType _arg) |
Set/Get multiplaction factor for clipping in MULTIPLYBYFACTOR mode. More... | |
virtual ScalarType | GetMultiplicationFactor () const |
Set/Get multiplaction factor for clipping in MULTIPLYBYFACTOR mode. More... | |
virtual void | SetHeightFieldResolutionX (unsigned int _arg) |
Set/Get x-resolution of height-field sampling (default: 256). More... | |
virtual unsigned int | GetHeightFieldResolutionX () const |
Set/Get x-resolution of height-field sampling (default: 256). More... | |
virtual void | SetHeightFieldResolutionY (unsigned int _arg) |
Set/Get y-resolution of height-field sampling (default: 256). More... | |
virtual unsigned int | GetHeightFieldResolutionY () const |
Set/Get y-resolution of height-field sampling (default: 256). More... | |
Public Member Functions inherited from mitk::ImageToImageFilter | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual void | SetInput (const InputImageType *image) |
virtual void | SetInput (unsigned int, const InputImageType *image) |
InputImageType * | GetInput (void) |
InputImageType * | GetInput (unsigned int idx) |
const InputImageType * | GetInput (void) const |
const InputImageType * | GetInput (unsigned int idx) const |
Public Member Functions inherited from mitk::ImageSource | |
Pointer | Clone () const |
OutputType * | GetOutput () |
Get the output data of this image source object. More... | |
const OutputType * | GetOutput () const |
OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
virtual itk::DataObject::Pointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
Make a DataObject of the correct type to used as the specified output. More... | |
virtual itk::DataObject::Pointer | MakeOutput (const DataObjectIdentifierType &name) override |
virtual vtkImageData * | GetVtkImageData () |
virtual const vtkImageData * | GetVtkImageData () const |
Public Member Functions inherited from mitk::BaseDataSource | |
OutputType * | GetOutput () |
const OutputType * | GetOutput () const |
OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
virtual void | GraftOutput (OutputType *output) |
Graft the specified BaseData onto this BaseDataSource's output. More... | |
virtual void | GraftOutput (const DataObjectIdentifierType &key, OutputType *output) |
virtual void | GraftNthOutput (unsigned int idx, OutputType *output) |
Graft the specified base data object onto this BaseDataSource's idx'th output. More... | |
bool | Updating () const |
Access itk::ProcessObject::m_Updating. More... | |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from mitk::ImageToImageFilter | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::ImageSource | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Method for creation through the object factory. More... | |
Static Public Member Functions inherited from mitk::BaseDataSource | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
HeightFieldSurfaceClipImageFilter () | |
~HeightFieldSurfaceClipImageFilter () | |
virtual void | GenerateInputRequestedRegion () override |
virtual void | GenerateOutputInformation () override |
virtual void | GenerateData () override |
A version of GenerateData() specific for image processing filters. More... | |
template<typename TPixel , unsigned int VImageDimension> | |
void | _InternalComputeClippedImage (itk::Image< TPixel, VImageDimension > *itkImage, HeightFieldSurfaceClipImageFilter *clipImageFilter, vtkPolyData *clippingPolyData, AffineTransform3D *imageToPlaneTransform) |
Protected Member Functions inherited from mitk::ImageToImageFilter | |
ImageToImageFilter () | |
virtual | ~ImageToImageFilter () |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Member Functions inherited from mitk::ImageSource | |
ImageSource () | |
virtual | ~ImageSource () |
virtual void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) |
If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More... | |
virtual void | PrepareOutputs () override |
This method is intentionally left blank. More... | |
virtual void | AllocateOutputs () |
The GenerateData method normally allocates the buffers for all of the outputs of a filter. More... | |
virtual void | BeforeThreadedGenerateData () |
If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More... | |
virtual void | AfterThreadedGenerateData () |
If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More... | |
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion) |
Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More... | |
Protected Member Functions inherited from mitk::BaseDataSource | |
BaseDataSource () | |
virtual | ~BaseDataSource () |
Protected Attributes | |
ImageTimeSelector::Pointer | m_InputTimeSelector |
ImageTimeSelector::Pointer | m_OutputTimeSelector |
int | m_ClippingMode |
ScalarType | m_ClippingConstant |
ScalarType | m_MultiplicationFactor |
unsigned | m_MultiPlaneValue |
unsigned int | m_HeightFieldResolutionX |
unsigned int | m_HeightFieldResolutionY |
double | m_MaxHeight |
itk::TimeStamp | m_TimeOfHeaderInitialization |
Time when Header was last initialized. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from mitk::ImageSource | |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
Static function used as a "callback" by the MultiThreader. More... | |
Static Protected Member Functions inherited from mitk::BaseDataSource | |
static Pointer | New () |
Filter for clipping an image with an height-field represented by an mitk::Surface.
The filter assumes that the surface represents a height field as seen from the plane defined by (1.0/0.0/0.0), (0.0/1.0/0.0). All voxels lying on one side of the height field will be clipped, i.e., set to 0. In addition, any voxels which are out of bounds when projected on this plane will be clipped as well.
Definition at line 47 of file mitkHeightFieldSurfaceClipImageFilter.h.
typedef std::vector<mitk::Surface *> mitk::HeightFieldSurfaceClipImageFilter::ClippingPlaneList |
Definition at line 50 of file mitkHeightFieldSurfaceClipImageFilter.h.
|
protected |
Definition at line 36 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References m_InputTimeSelector, m_OutputTimeSelector, and mitk::ImageTimeSelector::New().
|
protected |
Definition at line 52 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
|
protected |
Definition at line 138 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References CLIPPING_MODE_CONSTANT, CLIPPING_MODE_MULTIPLANE, CLIPPING_MODE_MULTIPLYBYFACTOR, m_ClippingConstant, m_ClippingMode, m_HeightFieldResolutionX, m_HeightFieldResolutionY, m_MaxHeight, m_MultiPlaneValue, m_MultiplicationFactor, m_OutputTimeSelector, MITK_INFO, mitk::New(), and mitk::ImageToItk< TOutputImage >::New().
Referenced by GenerateData().
Pointer mitk::HeightFieldSurfaceClipImageFilter::Clone | ( | ) | const |
|
overrideprotectedvirtual |
A version of GenerateData() specific for image processing filters.
This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter an be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.
Reimplemented from mitk::ImageSource.
Definition at line 343 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References _InternalComputeClippedImage(), AccessByItk_3, CLIPPING_MODE_MULTIPLANE, mitk::BaseData::GetGeometry(), mitk::TimeGeometry::GetGeometryForTimeStep(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::ImageToImageFilter::GetInput(), mitk::ImageSource::GetOutput(), mitk::SlicedData::GetRequestedRegion(), mitk::BaseData::GetTimeGeometry(), mitk::Surface::GetVtkPolyData(), mitk::BaseData::IsInitialized(), m_ClippingMode, m_InputTimeSelector, m_MultiPlaneValue, m_OutputTimeSelector, m_TimeOfHeaderInitialization, MITK_INFO, mitk::New(), mitk::TimeGeometry::TimePointToTimeStep(), and mitk::TimeGeometry::TimeStepToTimePoint().
|
overrideprotectedvirtual |
What is the input requested region that is required to produce the output requested region? The base assumption for image processing filters is that the input requested region can be set to match the output requested region. If a filter requires more input (for instance a filter that uses neighborhoods needs more input than output to avoid introducing artificial boundary conditions) or less input (for instance a magnify filter) will have to override this method. In doing so, it should call its superclass' implementation as its first step. Note that this imaging filters operate differently than the classes to this point in the class hierachy. Up till now, the base assumption has been that the largest possible region will be requested of the input.
Reimplemented from mitk::ImageToImageFilter.
Definition at line 89 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References mitk::GenerateTimeInInputRegion(), mitk::ImageToImageFilter::GetInput(), mitk::ImageSource::GetOutput(), mitk::BaseData::IsInitialized(), and mitk::SlicedData::SetRequestedRegionToLargestPossibleRegion().
|
overrideprotectedvirtual |
Definition at line 105 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References mitk::BaseGeometry::Clone(), mitk::Image::GetDimension(), mitk::BaseData::GetGeometry(), mitk::ImageToImageFilter::GetInput(), mitk::SlicedData::GetNumberOfChannels(), mitk::ImageSource::GetOutput(), mitk::Image::GetPixelType(), mitk::BaseData::GetPropertyList(), mitk::Image::Initialize(), mitk::BaseData::IsInitialized(), m_TimeOfHeaderInitialization, mitk::Image::SetGeometry(), and mitk::BaseData::SetPropertyList().
|
virtual |
Set/Get constant gray-value for clipping in CONSTANT mode.
int mitk::HeightFieldSurfaceClipImageFilter::GetClippingMode | ( | ) |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor.
Definition at line 77 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References m_ClippingMode.
const Surface * mitk::HeightFieldSurfaceClipImageFilter::GetClippingSurface | ( | ) | const |
Set/Get the surface defining a height field as a triangle mesh.
Definition at line 71 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
|
virtual |
Set/Get x-resolution of height-field sampling (default: 256).
|
virtual |
Set/Get y-resolution of height-field sampling (default: 256).
|
virtual |
Set/Get multiplaction factor for clipping in MULTIPLYBYFACTOR mode.
mitk::HeightFieldSurfaceClipImageFilter::mitkClassMacro | ( | HeightFieldSurfaceClipImageFilter | , |
ImageToImageFilter | |||
) |
|
static |
|
virtual |
Set/Get constant gray-value for clipping in CONSTANT mode.
void mitk::HeightFieldSurfaceClipImageFilter::SetClippingMode | ( | int | mode | ) |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor.
Definition at line 76 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References m_ClippingMode.
void mitk::HeightFieldSurfaceClipImageFilter::SetClippingModeToConstant | ( | ) |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor.
Definition at line 78 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References CLIPPING_MODE_CONSTANT, and m_ClippingMode.
void mitk::HeightFieldSurfaceClipImageFilter::SetClippingModeToMultiPlaneValue | ( | ) |
Definition at line 84 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References CLIPPING_MODE_MULTIPLANE, and m_ClippingMode.
void mitk::HeightFieldSurfaceClipImageFilter::SetClippingModeToMultiplyByFactor | ( | ) |
Specifies whether clipped part of the image shall be replaced by a constant or multiplied by a user-set factor.
Definition at line 79 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References CLIPPING_MODE_MULTIPLYBYFACTOR, and m_ClippingMode.
void mitk::HeightFieldSurfaceClipImageFilter::SetClippingSurface | ( | Surface * | clippingSurface | ) |
Set/Get the surface defining a height field as a triangle mesh.
Definition at line 53 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
void mitk::HeightFieldSurfaceClipImageFilter::SetClippingSurfaces | ( | ClippingPlaneList | planeList | ) |
Set/Get the surfaces defining a height field as a triangle mesh.
Definition at line 58 of file mitkHeightFieldSurfaceClipImageFilter.cpp.
References MITK_WARN.
|
virtual |
Set/Get x-resolution of height-field sampling (default: 256).
|
virtual |
Set/Get y-resolution of height-field sampling (default: 256).
|
virtual |
Set/Get multiplaction factor for clipping in MULTIPLYBYFACTOR mode.
|
protected |
Definition at line 136 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage().
|
protected |
Definition at line 134 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage(), GenerateData(), GetClippingMode(), SetClippingMode(), SetClippingModeToConstant(), SetClippingModeToMultiPlaneValue(), and SetClippingModeToMultiplyByFactor().
|
protected |
Definition at line 140 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage().
|
protected |
Definition at line 141 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage().
|
protected |
Definition at line 131 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by GenerateData(), and HeightFieldSurfaceClipImageFilter().
|
protected |
Definition at line 143 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage().
|
protected |
Definition at line 138 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage(), and GenerateData().
|
protected |
Definition at line 137 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage().
|
protected |
Definition at line 132 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by _InternalComputeClippedImage(), GenerateData(), and HeightFieldSurfaceClipImageFilter().
|
protected |
Time when Header was last initialized.
Definition at line 146 of file mitkHeightFieldSurfaceClipImageFilter.h.
Referenced by GenerateData(), and GenerateOutputInformation().