FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
TubeSegmentationAndCenterlineExtraction.hpp
Go to the documentation of this file.
1 #ifndef TUBE_SEGMENTATION_AND_CENTERLINE_EXTRACTION_HPP
2 #define TUBE_SEGMENTATION_AND_CENTERLINE_EXTRACTION_HPP
3 
4 #include "FAST/ProcessObject.hpp"
5 #include "FAST/Data/Image.hpp"
6 #include "FAST/Data/Mesh.hpp"
8 
9 namespace fast {
10 
13  public:
14  void setKeepLargestTree(bool keep);
15  void setMinimumTreeSize(int nrOfVoxels);
16  void setMinimumRadius(float radius);
17  void setMaximumRadius(float radius);
18  void setRadiusStep(float step);
19  void setSensitivity(float sensitivity);
20  // The voxel intensities are capped to these values
21  void setMinimumIntensity(float intensity);
22  // The voxel intensities are capped to these values
23  void setMaximumIntensity(float intensity);
24  void extractDarkTubes();
25  void extractBrightTubes();
26  void disableSegmentation();
27  void enableSegmentation();
28  // TODO move cropping out of this algorithm
29  void disableAutomaticCropping();
30  void enableAutomaticCropping(bool lungCropping = false);
31  DataChannel::pointer getSegmentationOutputPort();
32  DataChannel::pointer getCenterlineOutputPort();
33  DataChannel::pointer getTDFOutputPort();
34  private:
36  void execute();
37 
38  Image::pointer createGradients(Image::pointer image);
39  void runTubeDetectionFilter(Image::pointer gradients, float minimumRadius, float maximumRadius, Image::pointer& TDF, Image::pointer& radius);
40  void runNonCircularTubeDetectionFilter(Image::pointer gradients, float minimumRadius, float maximumRadius, Image::pointer& TDF, Image::pointer& radius);
41  Image::pointer runGradientVectorFlow(Image::pointer vectorField);
42  void keepLargestObjects(Segmentation::pointer segmentation, Mesh::pointer& centerlines);
43 
44  // Parameters
45 
46  // General
47  bool mSegmentation, mThresholdCropping, mLungCropping;
48  float mStDevBlurSmall, mStDevBlurLarge; // This should be tuned to the amount of noise in the image.
49  float mMinimumIntensity, mMaximumIntensity; // The voxel intensities are capped to these values
50  bool mExtractDarkStructures; // true and this extract dark structures, false and it extract bright structures
51 
52  // Radius
53  float mMinimumRadius, mMaximumRadius, mRadiusStep;
54 
55  // Centerline extraction
56  float mSensitivity; // A number between 0 and 1 influencing how much is extracted (including noise).
57 
58  bool mOnlyKeepLargestTree;
59  int mMinimumTreeSize;
60 };
61 
62 } // end namespace fast
63 
64 #endif
Image.hpp
fast
Definition: AffineTransformation.hpp:7
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
Segmentation.hpp
fast::TubeSegmentationAndCenterlineExtraction
Definition: TubeSegmentationAndCenterlineExtraction.hpp:11
fast::DataChannel::pointer
std::shared_ptr< DataChannel > pointer
Definition: DataChannel.hpp:12
ProcessObject.hpp
fast::DataObject::pointer
std::shared_ptr< DataObject > pointer
Definition: DataObject.hpp:16
Mesh.hpp
fast::ProcessObject
Definition: ProcessObject.hpp:22