ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Member Functions | Private Attributes | List of all members
QuickView Class Reference

#include <QuickView.h>

+ Collaboration diagram for QuickView:

Detailed Description

A convenient class to render itk images with vtk.

This class presents a convenient and efficient mechanism to display ITK images in VTK render windows.

The AddImage and AddRGBImage methods collect ITK images to be rendered in a collection of VTK RenderWindow's. Each image can be flipped about the vertical axis. An optional description will be displayed at the bottom of each render window.

If m_ShareCamera is true, a single vtkCamera will be used for each render window (default is false).

Each image is rescaled to have a range between 0 and 255. Currently, the size of each render window is fixed at 300,300 and the text size for descriptions is fixed at 10.

The Visualize method displays the render windows and starts a vtkInteractorStyleImage. The layout and background color of each render window is fixed. The optional boolean for the constructor, if false, bypasses the interactor. This is useful for running tests.

Typical usage:

* QuickView viewer;
* viewer.AddImage(someFilter->GetOutput().
* true (to flip image) or false.
* "text to display with the image");
*
* viewer.AddRGBImage(someFilter->GetOutput().
* true (to flip image) or false.
* "text to display with the image");
*
Examples:
WikiExamples/Curves/ContourMeanDistanceImageFilter.cxx, WikiExamples/Developer/OilPaintingImageFilter.cxx, WikiExamples/EdgesAndGradients/BinaryBoundaries.cxx, WikiExamples/EdgesAndGradients/BinaryContourImageFilter.cxx, WikiExamples/EdgesAndGradients/DerivativeImageFilter.cxx, WikiExamples/EdgesAndGradients/GradientMagnitudeImageFilter.cxx, WikiExamples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/RecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/SobelEdgeDetectionImageFilter.cxx, WikiExamples/EdgesAndGradients/ZeroCrossingBasedEdgeDetectionImageFilter.cxx, WikiExamples/ImageProcessing/AbsImageFilter.cxx, WikiExamples/ImageProcessing/ApproximateSignedDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/BinaryThresholdImageFilter.cxx, WikiExamples/ImageProcessing/CastImageFilter.cxx, WikiExamples/ImageProcessing/ConnectedComponentImageFilter.cxx, WikiExamples/ImageProcessing/ConvolutionImageFilter.cxx, WikiExamples/ImageProcessing/CropImageFilter.cxx, WikiExamples/ImageProcessing/ImageFilterOnARegion.cxx, WikiExamples/ImageProcessing/InvertIntensityImageFilter.cxx, WikiExamples/ImageProcessing/LabelGeometryImageFilter.cxx, WikiExamples/ImageProcessing/LaplacianImageFilter.cxx, WikiExamples/ImageProcessing/LaplacianSharpeningImageFilter.cxx, WikiExamples/ImageProcessing/MaskImageFilter.cxx, WikiExamples/ImageProcessing/MultiplyImageFilter.cxx, WikiExamples/ImageProcessing/NormalizeImageFilter.cxx, WikiExamples/ImageProcessing/PasteImageFilter.cxx, WikiExamples/ImageProcessing/RegionOfInterestImageFilter.cxx, WikiExamples/ImageProcessing/RelabelComponentImageFilter.cxx, WikiExamples/ImageProcessing/ResampleSegmentedImage.cxx, WikiExamples/ImageProcessing/RGBResampleImageFilter.cxx, WikiExamples/ImageProcessing/RGBToLuminanceImageFilter.cxx, WikiExamples/ImageProcessing/ScalarConnectedComponentImageFilter.cxx, WikiExamples/ImageProcessing/SigmoidImageFilter.cxx, WikiExamples/ImageProcessing/SignedDanielssonDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/SignedMaurerDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/ThresholdImageFilter.cxx, WikiExamples/ImageProcessing/ZeroCrossingImageFilter.cxx, WikiExamples/Images/FlipImageFilter.cxx, WikiExamples/Images/NormalizedCorrelationImageFilter.cxx, WikiExamples/ImageSegmentation/ConfidenceConnectedImageFilter.cxx, WikiExamples/ImageSegmentation/ExtractLargestConnectedComponentFromBinaryImage.cxx, WikiExamples/ImageSegmentation/LabelContourImageFilter.cxx, WikiExamples/Inspection/CheckerBoardImageFilter.cxx, WikiExamples/IO/ImageFileReader.cxx, WikiExamples/Iterators/ImageRegionConstIteratorWithIndex.cxx, WikiExamples/Iterators/ImageRegionIteratorWithIndex.cxx, WikiExamples/Iterators/LineIterator.cxx, WikiExamples/Morphology/BinaryDilateImageFilter.cxx, WikiExamples/Morphology/BinaryErodeImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalClosingImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalOpeningImageFilter.cxx, WikiExamples/Morphology/BinaryPruningImageFilter.cxx, WikiExamples/Morphology/FlatStructuringElement.cxx, WikiExamples/Morphology/GrayscaleDilateImageFilter.cxx, WikiExamples/Morphology/GrayscaleErodeImageFilter.cxx, WikiExamples/Registration/ImageRegistrationMethodBSpline.cxx, WikiExamples/Segmentation/ConnectedComponentImageFilterDemo.cxx, WikiExamples/Segmentation/OtsuMultipleThresholdsImageFilter.cxx, WikiExamples/Segmentation/OtsuThresholdImageFilter.cxx, WikiExamples/Segmentation/ThresholdImageFilterDemo.cxx, WikiExamples/SimpleOperations/CustomColormap.cxx, WikiExamples/SimpleOperations/RandomImageSource.cxx, WikiExamples/SimpleOperations/RegionOverlap.cxx, WikiExamples/SimpleOperations/TranslationTransform.cxx, WikiExamples/Smoothing/AntiAliasBinaryImageFilter.cxx, WikiExamples/Smoothing/BilateralImageFilter.cxx, WikiExamples/Smoothing/BinaryMinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/BinomialBlurImageFilter.cxx, WikiExamples/Smoothing/CurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/DiscreteGaussianImageFilter.cxx, WikiExamples/Smoothing/MeanImageFilter.cxx, WikiExamples/Smoothing/MedianImageFilter.cxx, WikiExamples/Smoothing/MinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/RGBCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/RGBMedianImageFilter.cxx, WikiExamples/Smoothing/RGBMinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/SmoothingRecursiveGaussianImageFilter.cxx, WikiExamples/Smoothing/VectorCurvatureAnisotropicDiffusionImageFilter.cxx, WikiExamples/Smoothing/VectorGradientAnisotropicDiffusionImageFilter.cxx, WikiExamples/Smoothing/VectorMeanImageFilter.cxx, WikiExamples/Smoothing/VectorMedianImageFilter.cxx, WikiExamples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter.cxx, and WikiExamples/Visualization/QuickViewDemo.cxx.

Definition at line 107 of file QuickView.h.

Public Member Functions

template<typename TImage >
void AddImage (TImage *, bool FlipVertical=true, std::string Description="")
 
template<typename TImage >
void AddRGBImage (TImage *, bool FlipVertical=true, std::string Description="")
 
void InterpolateOff ()
 
void InterpolateOn ()
 
 QuickView ()
 
void SetNumberOfColumns (const unsigned int columns)
 
void SetSnapshotPath (const std::string &iPath)
 
void SetSnapshotPrefix (const std::string &iPrefix)
 
void SetViewPortSize (const unsigned int size)
 
void ShareCameraOff ()
 
void ShareCameraOn ()
 
void SnapshotOff ()
 
void SnapshotOn ()
 
void Visualize (bool interact=true)
 
void SetSnapshotExtension (const std::string &iExtension)
 

Private Attributes

std::vector< ImageInfoImages
 
itk::IdentifierType m_Counter
 
bool m_Interpolate
 
unsigned int m_NumberOfColumns
 
bool m_ShareCamera
 
bool m_Snapshot
 
std::string m_SnapshotExtension
 
std::string m_SnapshotPath
 
std::string m_SnapshotPrefix
 
unsigned int m_ViewPortSize
 
std::vector< RGBImageInfoRGBImages
 

Constructor & Destructor Documentation

QuickView::QuickView ( )
inline

Definition at line 110 of file QuickView.h.

Member Function Documentation

template<typename TImage >
void QuickView::AddImage ( TImage *  ,
bool  FlipVertical = true,
std::string  Description = "" 
)

Add an image to be rendered.

Examples:
WikiExamples/Curves/ContourMeanDistanceImageFilter.cxx, WikiExamples/Developer/OilPaintingImageFilter.cxx, WikiExamples/EdgesAndGradients/BinaryBoundaries.cxx, WikiExamples/EdgesAndGradients/BinaryContourImageFilter.cxx, WikiExamples/EdgesAndGradients/DerivativeImageFilter.cxx, WikiExamples/EdgesAndGradients/GradientMagnitudeImageFilter.cxx, WikiExamples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/RecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/SobelEdgeDetectionImageFilter.cxx, WikiExamples/EdgesAndGradients/ZeroCrossingBasedEdgeDetectionImageFilter.cxx, WikiExamples/ImageProcessing/AbsImageFilter.cxx, WikiExamples/ImageProcessing/ApproximateSignedDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/BinaryThresholdImageFilter.cxx, WikiExamples/ImageProcessing/CastImageFilter.cxx, WikiExamples/ImageProcessing/ConnectedComponentImageFilter.cxx, WikiExamples/ImageProcessing/ConvolutionImageFilter.cxx, WikiExamples/ImageProcessing/ImageFilterOnARegion.cxx, WikiExamples/ImageProcessing/InvertIntensityImageFilter.cxx, WikiExamples/ImageProcessing/LabelGeometryImageFilter.cxx, WikiExamples/ImageProcessing/LaplacianImageFilter.cxx, WikiExamples/ImageProcessing/LaplacianSharpeningImageFilter.cxx, WikiExamples/ImageProcessing/MaskImageFilter.cxx, WikiExamples/ImageProcessing/MultiplyImageFilter.cxx, WikiExamples/ImageProcessing/NormalizeImageFilter.cxx, WikiExamples/ImageProcessing/PasteImageFilter.cxx, WikiExamples/ImageProcessing/RGBToLuminanceImageFilter.cxx, WikiExamples/ImageProcessing/ScalarConnectedComponentImageFilter.cxx, WikiExamples/ImageProcessing/SigmoidImageFilter.cxx, WikiExamples/ImageProcessing/SignedDanielssonDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/SignedMaurerDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/ThresholdImageFilter.cxx, WikiExamples/ImageProcessing/ZeroCrossingImageFilter.cxx, WikiExamples/Images/FlipImageFilter.cxx, WikiExamples/Images/NormalizedCorrelationImageFilter.cxx, WikiExamples/ImageSegmentation/ConfidenceConnectedImageFilter.cxx, WikiExamples/ImageSegmentation/ExtractLargestConnectedComponentFromBinaryImage.cxx, WikiExamples/ImageSegmentation/LabelContourImageFilter.cxx, WikiExamples/Inspection/CheckerBoardImageFilter.cxx, WikiExamples/IO/ImageFileReader.cxx, WikiExamples/Iterators/ImageRegionConstIteratorWithIndex.cxx, WikiExamples/Iterators/ImageRegionIteratorWithIndex.cxx, WikiExamples/Iterators/LineIterator.cxx, WikiExamples/Morphology/BinaryDilateImageFilter.cxx, WikiExamples/Morphology/BinaryErodeImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalClosingImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalOpeningImageFilter.cxx, WikiExamples/Morphology/BinaryPruningImageFilter.cxx, WikiExamples/Morphology/FlatStructuringElement.cxx, WikiExamples/Morphology/GrayscaleDilateImageFilter.cxx, WikiExamples/Morphology/GrayscaleErodeImageFilter.cxx, WikiExamples/Registration/ImageRegistrationMethodBSpline.cxx, WikiExamples/Segmentation/ConnectedComponentImageFilterDemo.cxx, WikiExamples/Segmentation/OtsuMultipleThresholdsImageFilter.cxx, WikiExamples/Segmentation/OtsuThresholdImageFilter.cxx, WikiExamples/Segmentation/ThresholdImageFilterDemo.cxx, WikiExamples/SimpleOperations/RandomImageSource.cxx, WikiExamples/SimpleOperations/RegionOverlap.cxx, WikiExamples/SimpleOperations/TranslationTransform.cxx, WikiExamples/Smoothing/AntiAliasBinaryImageFilter.cxx, WikiExamples/Smoothing/BilateralImageFilter.cxx, WikiExamples/Smoothing/BinaryMinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/BinomialBlurImageFilter.cxx, WikiExamples/Smoothing/CurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/DiscreteGaussianImageFilter.cxx, WikiExamples/Smoothing/MeanImageFilter.cxx, WikiExamples/Smoothing/MedianImageFilter.cxx, WikiExamples/Smoothing/MinMaxCurvatureFlowImageFilter.cxx, WikiExamples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter.cxx, and WikiExamples/Visualization/QuickViewDemo.cxx.
template<typename TImage >
void QuickView::AddRGBImage ( TImage *  ,
bool  FlipVertical = true,
std::string  Description = "" 
)
void QuickView::InterpolateOff ( )
inline

Use pixel replication in rendered image

Examples:
WikiExamples/ImageProcessing/LabelGeometryImageFilter.cxx.

Definition at line 153 of file QuickView.h.

void QuickView::InterpolateOn ( )
inline

Use pixel interpolation in rendered image

Definition at line 159 of file QuickView.h.

void QuickView::SetNumberOfColumns ( const unsigned int  columns)
inline

Set the number of columns, default 4.

Definition at line 199 of file QuickView.h.

void QuickView::SetSnapshotExtension ( const std::string &  iExtension)
inline

Provide the image format to be used when taking snapshot

Definition at line 187 of file QuickView.h.

void QuickView::SetSnapshotPath ( const std::string &  iPath)
inline

Definition at line 176 of file QuickView.h.

void QuickView::SetSnapshotPrefix ( const std::string &  iPrefix)
inline

Definition at line 181 of file QuickView.h.

void QuickView::SetViewPortSize ( const unsigned int  size)
inline

Set the viewport size, default 300.

Definition at line 205 of file QuickView.h.

void QuickView::ShareCameraOff ( )
inline

Each render window will have its own camera

Examples:
WikiExamples/ImageProcessing/LabelGeometryImageFilter.cxx, and WikiExamples/Images/FlipImageFilter.cxx.

Definition at line 141 of file QuickView.h.

void QuickView::ShareCameraOn ( )
inline

Each render window will use the same camera

Definition at line 147 of file QuickView.h.

void QuickView::SnapshotOff ( )
inline

Each render window will take a snaphot

Definition at line 171 of file QuickView.h.

void QuickView::SnapshotOn ( )
inline

Each render window will take a snaphot

Definition at line 165 of file QuickView.h.

void QuickView::Visualize ( bool  interact = true)

Render the images. If interact is tru, start a vtk Interactor. If false, return after one render.

Examples:
WikiExamples/Curves/ContourMeanDistanceImageFilter.cxx, WikiExamples/Developer/OilPaintingImageFilter.cxx, WikiExamples/EdgesAndGradients/BinaryBoundaries.cxx, WikiExamples/EdgesAndGradients/BinaryContourImageFilter.cxx, WikiExamples/EdgesAndGradients/DerivativeImageFilter.cxx, WikiExamples/EdgesAndGradients/GradientMagnitudeImageFilter.cxx, WikiExamples/EdgesAndGradients/GradientMagnitudeRecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/LaplacianRecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/RecursiveGaussianImageFilter.cxx, WikiExamples/EdgesAndGradients/SobelEdgeDetectionImageFilter.cxx, WikiExamples/EdgesAndGradients/ZeroCrossingBasedEdgeDetectionImageFilter.cxx, WikiExamples/ImageProcessing/AbsImageFilter.cxx, WikiExamples/ImageProcessing/ApproximateSignedDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/BinaryThresholdImageFilter.cxx, WikiExamples/ImageProcessing/CastImageFilter.cxx, WikiExamples/ImageProcessing/ConnectedComponentImageFilter.cxx, WikiExamples/ImageProcessing/ConvolutionImageFilter.cxx, WikiExamples/ImageProcessing/CropImageFilter.cxx, WikiExamples/ImageProcessing/ImageFilterOnARegion.cxx, WikiExamples/ImageProcessing/InvertIntensityImageFilter.cxx, WikiExamples/ImageProcessing/LabelGeometryImageFilter.cxx, WikiExamples/ImageProcessing/LaplacianImageFilter.cxx, WikiExamples/ImageProcessing/LaplacianSharpeningImageFilter.cxx, WikiExamples/ImageProcessing/MaskImageFilter.cxx, WikiExamples/ImageProcessing/MultiplyImageFilter.cxx, WikiExamples/ImageProcessing/NormalizeImageFilter.cxx, WikiExamples/ImageProcessing/PasteImageFilter.cxx, WikiExamples/ImageProcessing/RegionOfInterestImageFilter.cxx, WikiExamples/ImageProcessing/RelabelComponentImageFilter.cxx, WikiExamples/ImageProcessing/ResampleSegmentedImage.cxx, WikiExamples/ImageProcessing/RGBResampleImageFilter.cxx, WikiExamples/ImageProcessing/RGBToLuminanceImageFilter.cxx, WikiExamples/ImageProcessing/ScalarConnectedComponentImageFilter.cxx, WikiExamples/ImageProcessing/SigmoidImageFilter.cxx, WikiExamples/ImageProcessing/SignedDanielssonDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/SignedMaurerDistanceMapImageFilter.cxx, WikiExamples/ImageProcessing/ThresholdImageFilter.cxx, WikiExamples/ImageProcessing/ZeroCrossingImageFilter.cxx, WikiExamples/Images/FlipImageFilter.cxx, WikiExamples/Images/NormalizedCorrelationImageFilter.cxx, WikiExamples/ImageSegmentation/ConfidenceConnectedImageFilter.cxx, WikiExamples/ImageSegmentation/ExtractLargestConnectedComponentFromBinaryImage.cxx, WikiExamples/ImageSegmentation/LabelContourImageFilter.cxx, WikiExamples/Inspection/CheckerBoardImageFilter.cxx, WikiExamples/IO/ImageFileReader.cxx, WikiExamples/Iterators/ImageRegionConstIteratorWithIndex.cxx, WikiExamples/Iterators/ImageRegionIteratorWithIndex.cxx, WikiExamples/Iterators/LineIterator.cxx, WikiExamples/Morphology/BinaryDilateImageFilter.cxx, WikiExamples/Morphology/BinaryErodeImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalClosingImageFilter.cxx, WikiExamples/Morphology/BinaryMorphologicalOpeningImageFilter.cxx, WikiExamples/Morphology/BinaryPruningImageFilter.cxx, WikiExamples/Morphology/FlatStructuringElement.cxx, WikiExamples/Morphology/GrayscaleDilateImageFilter.cxx, WikiExamples/Morphology/GrayscaleErodeImageFilter.cxx, WikiExamples/Registration/ImageRegistrationMethodBSpline.cxx, WikiExamples/Segmentation/ConnectedComponentImageFilterDemo.cxx, WikiExamples/Segmentation/OtsuMultipleThresholdsImageFilter.cxx, WikiExamples/Segmentation/OtsuThresholdImageFilter.cxx, WikiExamples/Segmentation/ThresholdImageFilterDemo.cxx, WikiExamples/SimpleOperations/CustomColormap.cxx, WikiExamples/SimpleOperations/RandomImageSource.cxx, WikiExamples/SimpleOperations/RegionOverlap.cxx, WikiExamples/SimpleOperations/TranslationTransform.cxx, WikiExamples/Smoothing/AntiAliasBinaryImageFilter.cxx, WikiExamples/Smoothing/BilateralImageFilter.cxx, WikiExamples/Smoothing/BinaryMinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/BinomialBlurImageFilter.cxx, WikiExamples/Smoothing/CurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/DiscreteGaussianImageFilter.cxx, WikiExamples/Smoothing/MeanImageFilter.cxx, WikiExamples/Smoothing/MedianImageFilter.cxx, WikiExamples/Smoothing/MinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/RGBCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/RGBMedianImageFilter.cxx, WikiExamples/Smoothing/RGBMinMaxCurvatureFlowImageFilter.cxx, WikiExamples/Smoothing/SmoothingRecursiveGaussianImageFilter.cxx, WikiExamples/Smoothing/VectorCurvatureAnisotropicDiffusionImageFilter.cxx, WikiExamples/Smoothing/VectorGradientAnisotropicDiffusionImageFilter.cxx, WikiExamples/Smoothing/VectorMeanImageFilter.cxx, WikiExamples/Smoothing/VectorMedianImageFilter.cxx, WikiExamples/SpectralAnalysis/VnlFFTRealToComplexConjugateImageFilter.cxx, and WikiExamples/Visualization/QuickViewDemo.cxx.

Member Data Documentation

std::vector<ImageInfo> QuickView::Images
private

Definition at line 211 of file QuickView.h.

itk::IdentifierType QuickView::m_Counter
private

Definition at line 213 of file QuickView.h.

bool QuickView::m_Interpolate
private

Definition at line 219 of file QuickView.h.

unsigned int QuickView::m_NumberOfColumns
private

Definition at line 220 of file QuickView.h.

bool QuickView::m_ShareCamera
private

Definition at line 217 of file QuickView.h.

bool QuickView::m_Snapshot
private

Definition at line 218 of file QuickView.h.

std::string QuickView::m_SnapshotExtension
private

Definition at line 216 of file QuickView.h.

std::string QuickView::m_SnapshotPath
private

Definition at line 214 of file QuickView.h.

std::string QuickView::m_SnapshotPrefix
private

Definition at line 215 of file QuickView.h.

unsigned int QuickView::m_ViewPortSize
private

Definition at line 221 of file QuickView.h.

std::vector<RGBImageInfo> QuickView::RGBImages
private

Definition at line 212 of file QuickView.h.


The documentation for this class was generated from the following file: