NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkBreastMaskSegmentationFromMRI.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkBreastMaskSegmentationFromMRI_h
16 #define itkBreastMaskSegmentationFromMRI_h
17 
18 
19 #include <math.h>
20 #include <float.h>
21 #include <iomanip>
22 
23 #include <itkImage.h>
24 #include <itkImageRegionIterator.h>
25 #include <itkImageRegionConstIterator.h>
26 #include <itkImageSliceIteratorWithIndex.h>
27 #include <itkImageLinearIteratorWithIndex.h>
29 #include <itkImageFileReader.h>
30 #include <itkImageFileWriter.h>
31 #include <itkRescaleIntensityImageFilter.h>
32 #include <itkMaskImageFilter.h>
33 #include <itkResampleImageFilter.h>
34 #include <itkLinearInterpolateImageFunction.h>
35 #include <itkIdentityTransform.h>
36 #include <itkImageDuplicator.h>
37 #include <itkScalarImageToHistogramGenerator.h>
38 #include <itkMinimumMaximumImageCalculator.h>
39 #include <itkRayleighFunction.h>
41 #include <itkScalarImageToHistogramGenerator.h>
42 #include <itkConnectedThresholdImageFilter.h>
43 #include <itkCurvatureFlowImageFilter.h>
44 #include <itkConnectedComponentImageFilter.h>
45 #include <itkBSplineScatteredDataPointSetToImageFilter.h>
46 #include <itkPointSet.h>
48 #include <itkSmoothingRecursiveGaussianImageFilter.h>
50 #include <itkCurvatureAnisotropicDiffusionImageFilter.h>
51 #include <itkGradientMagnitudeRecursiveGaussianImageFilter.h>
52 #include <itkSigmoidImageFilter.h>
53 #include <itkFastMarchingImageFilter.h>
54 #include <itkBinaryThresholdImageFilter.h>
57 #include <itkAffineTransform.h>
60 #include <itkRegionOfInterestImageFilter.h>
61 #include <itkImageRegionIteratorWithIndex.h>
62 #include <itkMaximumImageFilter.h>
63 #include <itkImageAdaptor.h>
64 
65 #include <vtkMarchingCubes.h>
66 #include <vtkPolyDataWriter.h>
67 #include <vtkSmartPointer.h>
68 #include <vtkWindowedSincPolyDataFilter.h>
69 
70 #include <vnl/vnl_vector.h>
71 #include <vnl/vnl_double_3.h>
72 #include <vnl/algo/vnl_levenberg_marquardt.h>
73 
74 namespace itk
75 {
76 
84 template <const unsigned int ImageDimension, class InputPixelType>
85 class ITK_EXPORT BreastMaskSegmentationFromMRI : public Object
86 {
87 public:
88 
90  typedef Object Superclass;
91  typedef SmartPointer<Self> Pointer;
92  typedef SmartPointer<const Self> ConstPointer;
93 
94  itkTypeMacro(BreastMaskSegmentationFromMRI, Object);
95 
96  itkStaticConstMacro( SliceDimension, unsigned int, 2 );
97  itkStaticConstMacro( ParametricDimension, unsigned int, 2 );
98  itkStaticConstMacro( DataDimension, unsigned int, 1 );
99 
100  typedef float RealType;
101 
102  typedef itk::Image<InputPixelType, ImageDimension> InternalImageType;
103  typedef itk::Image<RealType, SliceDimension> AxialImageType;
104 
105  typedef itk::Vector<RealType, DataDimension> VectorType;
106  typedef itk::Image<VectorType, ParametricDimension> VectorImageType;
107  typedef itk::PointSet<VectorType, ParametricDimension> PointSetType;
108 
109  typedef typename PointSetType::PointsContainer PointsContainer;
110  typedef typename PointsContainer::Iterator PointsIterator;
111  typedef typename PointSetType::PointDataContainer PointDataContainer;
112  typedef typename PointDataContainer::Iterator PointDataIterator;
113 
114  typedef itk::ImageRegionIterator< InternalImageType > IteratorType;
115  typedef itk::ImageRegionIteratorWithIndex<InternalImageType> IteratorWithIndexType;
116  typedef itk::ImageSliceIteratorWithIndex< InternalImageType > SliceIteratorType;
117  typedef itk::ImageLinearIteratorWithIndex< InternalImageType > LineIteratorType;
118 
119 
120  typedef itk::ImageDuplicator< InternalImageType > DuplicatorType;
121 
122  typedef itk::Image<InputPixelType, SliceDimension> InputSliceType;
124 
126 
128 
129  typedef itk::CurvatureAnisotropicDiffusionImageFilter< InternalImageType,
130  InternalImageType > SmoothingFilterType;
131 
132 
133  typedef itk::GradientMagnitudeRecursiveGaussianImageFilter< InternalImageType,
134  InternalImageType > GradientFilterType;
135 
136  typedef itk::SigmoidImageFilter<InternalImageType,
137  InternalImageType > SigmoidFilterType;
138 
139  typedef itk::FastMarchingImageFilter< InternalImageType,
140  InternalImageType > FastMarchingFilterType;
141 
142  typedef itk::BinaryThresholdImageFilter< InternalImageType,
143  InternalImageType > ThresholdingFilterType;
144 
145  typedef itk::LewisGriffinRecursiveGaussianImageFilter < InternalImageType,
146  InternalImageType > DerivativeFilterType;
147 
149 
150  typedef itk::MaximumImageFilter <InternalImageType, InternalImageType> MaxImageFilterType;
151 
152  typedef itk::ConnectedThresholdImageFilter< InternalImageType,
153  InternalImageType > ConnectedFilterType;
154 
156  typedef enum {
159  RIGHT_BREAST
160  } enumBreastSideType;
161 
162 
163  void SetVerbose( bool flag ) { flgVerbose = flag; }
164  void SetSmooth( bool flag ) { flgSmooth = flag; }
165 
166  void SetLeftBreast( bool flag ) { flgLeft = flag; }
167  void SetRightBreast( bool flag ) { flgRight = flag; }
168 
169  void SetExtInitialPect( bool flag ) { flgExtInitialPect = flag; }
170 
171  void SetRegionGrowX( int coord ) { regGrowXcoord = coord; flgRegGrowXcoord = true; }
172  void SetRegionGrowY( int coord ) { regGrowYcoord = coord; flgRegGrowYcoord = true; }
173  void SetRegionGrowZ( int coord ) { regGrowZcoord = coord; flgRegGrowZcoord = true; }
174 
175  void SetBackgroundThreshold( float threshold ) { bgndThresholdProb = threshold; }
176  void SetFinalSegmThreshold( float threshold ) { finalSegmThreshold = threshold; }
177 
178  void SetSigmaInMM( float sigma ) { sigmaInMM = sigma; }
179 
180  void SetMarchingK1( float k1 ) { fMarchingK1 = k1; }
181  void SetMarchingK2( float k2 ) { fMarchingK2 = k2; }
182  void SetMarchingTime( float t ) { fMarchingTime = t; }
183 
184  void SetCoilCropDistance( float cropDist ) { coilCropDistance = cropDist; }
185  void SetCropDistancePosteriorToMidSternum( float fDistIn ) { cropDistPosteriorToMidSternum = fDistIn; }
186 
187  void SetOutputBIFS( std::string fn ) { fileOutputBIFs = fn; }
188  void SetSigmaBIF( float sig ){ sigmaBIF = sig; }
189 
190  void SetOutputSmoothedStructural( std::string fn ) { fileOutputSmoothedStructural = fn; }
191  void SetOutputSmoothedFatSat( std::string fn ) { fileOutputSmoothedFatSat = fn; }
192  void SetOutputClosedStructural( std::string fn ) { fileOutputClosedStructural = fn; }
193  void SetOutputHistogram( std::string fn ) { fileOutputCombinedHistogram = fn; }
194  void SetOutputFit( std::string fn ) { fileOutputRayleigh = fn; }
195  void SetOutputCDF( std::string fn ) { fileOutputFreqLessBgndCDF = fn; }
196  void SetOutputImageMax( std::string fn ) { fileOutputMaxImage = fn; }
197  void SetOutputImageMaxClosed( std::string fn ) { fileOutputMaxClosedImage = fn; }
198  void SetOutputBackground( std::string fn ) { fileOutputBackground = fn; }
199  void SetOutputChestPoints( std::string fn ) { fileOutputChestPoints = fn; }
200 
201  void SetPectoralControlPointSpacing( float d ) { pecControlPointSpacing = d; }
202  void SetOutputPectoralMask( std::string fn ) { fileOutputPectoral = fn; }
203  void SetOutputPecSurfaceMask( std::string fn ) { fileOutputPectoralSurfaceMask = fn; }
204 
205  void SetOutputGradientMagImage( std::string fn ) { fileOutputGradientMagImage = fn; }
206  void SetOutputSpeedImage( std::string fn ) { fileOutputSpeedImage = fn; }
207  void SetOutputFastMarchingImage( std::string fn ) { fileOutputFastMarchingImage = fn; }
208 
209  void SetOutputPectoralSurf( std::string fn ) { fileOutputPectoralSurfaceVoxels = fn; }
210 
211  void SetExcludeAxilla( bool flag ) { flgExcludeAxilla = flag; }
212  void SetCropFit( bool flag ) { flgCropWithFittedSurface = flag; }
213  void SetOutputBreastFittedSurfMask( std::string fn ) { fileOutputFittedBreastMask = fn; }
214 
215  void SetOutputVTKSurface( std::string fn ) { fileOutputVTKSurface = fn; }
216 
217  void SetOutputSkinElevationMap( std::string fn ) { fileOutputSkinElevationMap = fn; }
218  void SetOutputSkinSurfaceNoBreasts( std::string fn ) { fileOutputSkinSurfaceNoBreasts = fn; }
219 
220 
221  void SetStructuralImage( typename InternalImageType::Pointer image ) { imStructural = image; }
222 
223  void SetFatSatImage( typename InternalImageType::Pointer image ) { imFatSat = image; }
224 
225  void SetBIFImage( typename InternalImageType::Pointer image ) { imBIFs = image; }
226 
227 
229  return idxNippleLeft;
230  }
231 
233  return idxNippleRight;
234  }
235 
237  return idxMidSternum;
238  }
239 
241  virtual void Execute( void ) = 0;
242 
243  typename InternalImageType::Pointer GetSegmentedImage( void ) {
244  return imSegmented;
245  };
246 
249  WriteBinaryImageToUCharFile( fileOutput, "final segmented image",
250  imSegmented, flgLeft, flgRight );
251  };
252 
253 
254  // --------------------------------------------------------------------------
255  // Sort pairs in descending order, thus largest elements first
256  // --------------------------------------------------------------------------
257 
258  template<class T>
260  : std::binary_function<T,T,bool>
261  {
262  inline bool operator()(const T &lhs, const T &rhs)
263  {
264  return lhs.second > rhs.second;
265  }
266  };
267 
268 
269  // --------------------------------------------------------------------------
270  // Pixel accessor class to include ascending and descending dark lines
271  // from BIF image into region Growing
272  // --------------------------------------------------------------------------
273 
275  {
276  public:
279 
280  static ExternalType Get( const InternalType &in )
281  {
282  if ( in == 15.0f || in == 16.0f || in == 18.0f ) return 15.0f;
283  else return in;
284  }
285  };
286 
287 
288 protected:
289 
291  bool flgXML;
292  bool flgSmooth;
293  bool flgLeft;
294  bool flgRight;
296 
300 
303 
304  unsigned int i;
305 
309 
312 
314 
316 
317  float sigmaInMM;
318 
319  float fMarchingK1;
320  float fMarchingK2;
322 
323  float sigmaBIF;
324 
327 
329 
331 
344 
348 
350 
352 
354 
357 
358  typename InternalImageType::Pointer imStructural;
359  typename InternalImageType::Pointer imFatSat;
360  typename InternalImageType::Pointer imBIFs;
361 
362  typename InternalImageType::Pointer imSpeedFuncInputImage; // This will be a copy of the structural image after smoothing
363  typename InternalImageType::Pointer imMaximum;
364  typename InternalImageType::Pointer imMaxClosed;
365  typename InternalImageType::Pointer imPectoralVoxels;
366  typename InternalImageType::Pointer imPectoralSurfaceVoxels;
367  typename InternalImageType::Pointer imChestSurfaceVoxels;
368  typename InternalImageType::Pointer imSegmented;
369 
370  typename InternalImageType::Pointer imTmp;
371 
372  typename AxialImageType::Pointer imSkinElevationMap;
373 
377 
378 
380 
382 
385 
386 
387 
389 
392 
395 
396  typename InternalImageType::IndexType idxAreolarRight[4];
397  typename InternalImageType::IndexType idxAreolarLeft[4];
398 
399 
402 
405 
407  virtual void Initialise( void );
408 
410  virtual void CreateBIFs( void );
411 
413  void SmoothTheInputImages( void );
414 
416  typename InternalImageType::Pointer ScanLineMaxima( typename InternalImageType::Pointer image,
417  typename InternalImageType::RegionType region,
418  unsigned int direction, bool flgForward );
420  typename InternalImageType::Pointer GreyScaleCloseImage( typename InternalImageType::Pointer image,
421  typename InternalImageType::RegionType region,
422  unsigned int direction,
423  const std::string label );
425  typename InternalImageType::Pointer GreyScaleCloseImage( typename InternalImageType::Pointer image,
426  typename InternalImageType::RegionType region,
427  const char *strSide );
428 
430  void GreyScaleClosing( void );
431 
433  void CalculateTheMaximumImage( void );
434 
436  void EnsureMaxImageHasOnlyPositiveIntensities( void );
437 
439  void SmoothMaxImageToIncreaseSeparationOfTheBackground( void );
440 
442  void SegmentForegroundFromBackground( void );
443 
445  void SegmentBackground( void );
446 
448  void ComputeElevationOfAnteriorSurface( bool flgCoilCrop=false );
449 
452  FindSurfacePoint( typename InternalImageType::IndexType idxNipple,
453  float deltaXinMM, float deltaZinMM );
454 
456  void FindBreastLandmarks( void );
457 
459  typename PointSetType::Pointer SegmentThePectoralMuscle( RealType rYHeightOffset,
460  unsigned long &iPointPec,
461  bool flgIncludeNippleSeeds=false );
462 
464  void CropTheMaskAccordingToEstimateOfCoilExtentInCoronalPlane( void );
466  void MaskWithBSplineBreastSurface( RealType rYHeightOffset );
468  void MaskBreastWithSphere( void );
469 
471  void SmoothMask( void );
472 
474  void ExtractLargestObject( enumBreastSideType breastSide );
475 
476 
477  double DistanceBetweenVoxels( typename InternalImageType::IndexType p,
478  typename InternalImageType::IndexType q );
479 
480  std::string ModifySuffix( std::string filename,
481  std::string strInsertBeforeSuffix );
482 
483  std::string GetBreastSide( std::string &fileOutput,
484  enumBreastSideType breastSide );
485 
486  typename InternalImageType::Pointer GetBreastSide( typename InternalImageType::Pointer inImage,
487  enumBreastSideType breastSide );
488 
489  bool WriteImageToFile( std::string &fileOutput,
490  const char *description,
491  typename InternalImageType::Pointer image,
492  enumBreastSideType breastSide );
493 
494  bool WriteImageToFile( std::string &fileOutput,
495  const char *description,
496  typename InternalImageType::Pointer image,
497  bool flgLeft=false, bool flgRight=false );
498 
499  bool WriteBinaryImageToUCharFile( std::string &fileOutput,
500  const char *description,
501  typename InternalImageType::Pointer image,
502  enumBreastSideType breastSide );
503 
504  bool WriteBinaryImageToUCharFile( std::string &fileOutput,
505  const char *description,
506  typename InternalImageType::Pointer image,
507  bool flgLeft, bool flgRight );
508 
510  bool WriteBinaryImageToUCharFileOrVTKSurfaceFile( std::string &fileOutput,
511  const char *description,
512  typename InternalImageType::Pointer image,
513  bool flgLeft, bool flgRight );
514 
515  void WriteHistogramToFile( std::string fileOutput,
516  vnl_vector< double > &xHistIntensity,
517  vnl_vector< double > &yHistFrequency,
518  unsigned int nBins );
519 
520  void polyDataInfo(vtkPolyData *polyData);
521 
522  void WriteImageToVTKSurfaceFile(typename InternalImageType::Pointer image,
523  std::string &fileOutput,
524  enumBreastSideType breastSide,
525  bool flgVerbose,
526  float finalSegmThreshold );
527 
528  typename InternalImageType::Pointer
529  MaskImageFromBSplineFittedSurface( const typename PointSetType::Pointer &pointSet,
530  const typename InternalImageType::RegionType &region,
531  const typename InternalImageType::PointType &origin,
532  const typename InternalImageType::SpacingType &spacing,
533  const typename InternalImageType::DirectionType &direction,
534  const RealType rYHeightOffset,
535  const int splineOrder,
536  const RealType controlPointSpacingInMM,
537  const int numOfLevels,
538  bool correctSurfaceOffest );
539 
540 
541 private:
542 
543  BreastMaskSegmentationFromMRI(const Self&); //purposely not implemented
544  void operator=(const Self&); //purposely not implemented
545 
546 
547 };
548 
549 } // end namespace itk
550 
551 #ifndef ITK_MANUAL_INSTANTIATION
552 #include "itkBreastMaskSegmentationFromMRI.txx"
553 #endif
554 
555 #endif
556 
557 
558 
559 
560 
AxialImageType::Pointer imSkinElevationMap
Definition: itkBreastMaskSegmentationFromMRI.h:372
PointsContainer::Iterator PointsIterator
Definition: itkBreastMaskSegmentationFromMRI.h:110
void SetExtInitialPect(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:169
std::string fileOutputMaxImage
Definition: itkBreastMaskSegmentationFromMRI.h:338
itk::PointSet< VectorType, ParametricDimension > PointSetType
Definition: itkBreastMaskSegmentationFromMRI.h:107
std::string fileOutputBackground
Definition: itkBreastMaskSegmentationFromMRI.h:340
std::string fileOutputCombinedHistogram
Definition: itkBreastMaskSegmentationFromMRI.h:335
BreastMaskSegmentationFromMRI Self
Definition: itkBreastMaskSegmentationFromMRI.h:89
void SetOutputHistogram(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:193
itk::ImageLinearIteratorWithIndex< InternalImageType > LineIteratorType
Definition: itkBreastMaskSegmentationFromMRI.h:117
Definition: itkBreastMaskSegmentationFromMRI.h:157
itk::Image< VectorType, ParametricDimension > VectorImageType
Definition: itkBreastMaskSegmentationFromMRI.h:106
itk::ConnectedThresholdImageFilter< InternalImageType, InternalImageType > ConnectedFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:153
void SetOutputGradientMagImage(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:205
void SetPectoralControlPointSpacing(float d)
Definition: itkBreastMaskSegmentationFromMRI.h:201
int regGrowYcoord
Definition: itkBreastMaskSegmentationFromMRI.h:307
std::string fileOutputPectoral
Definition: itkBreastMaskSegmentationFromMRI.h:343
void SetRegionGrowZ(int coord)
Definition: itkBreastMaskSegmentationFromMRI.h:173
void polyDataInfo(vtkPolyData *polyData)
Definition: niftkCreateBreastMesh.cxx:1050
InternalImageType::RegionType m_RightLateralRegion
Definition: itkBreastMaskSegmentationFromMRI.h:376
std::string fileOutputVTKSurface
Definition: itkBreastMaskSegmentationFromMRI.h:353
int regGrowXcoord
Definition: itkBreastMaskSegmentationFromMRI.h:306
void SetOutputClosedStructural(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:192
GLuint coord
Definition: glew.h:7061
itk::Image< InputPixelType, SliceDimension > InputSliceType
Definition: itkBreastMaskSegmentationFromMRI.h:122
InputPixelType ExternalType
Definition: itkBreastMaskSegmentationFromMRI.h:278
Base class for breast mask MRI segmentation methods.
Definition: itkBreastMaskSegmentationFromMRI.h:85
void SetFinalSegmThreshold(float threshold)
Definition: itkBreastMaskSegmentationFromMRI.h:176
float sigmaBIF
Definition: itkBreastMaskSegmentationFromMRI.h:323
void SetOutputPecSurfaceMask(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:203
itk::FastMarchingImageFilter< InternalImageType, InternalImageType > FastMarchingFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:140
InternalImageType::Pointer imTmp
Definition: itkBreastMaskSegmentationFromMRI.h:370
bool operator()(const T &lhs, const T &rhs)
Definition: itkBreastMaskSegmentationFromMRI.h:262
void SetOutputPectoralSurf(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:209
itk::MaximumImageFilter< InternalImageType, InternalImageType > MaxImageFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:150
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: glew.h:4052
void SetCropDistancePosteriorToMidSternum(float fDistIn)
Definition: itkBreastMaskSegmentationFromMRI.h:185
std::string fileOutputChestPoints
Definition: itkBreastMaskSegmentationFromMRI.h:342
void SetRegionGrowY(int coord)
Definition: itkBreastMaskSegmentationFromMRI.h:172
float pecControlPointSpacing
Definition: itkBreastMaskSegmentationFromMRI.h:328
void WriteImageToFile(const char *fileOutput, const char *description, typename TOutputImage::Pointer image)
Write an ITK image to a file and print a message.
Definition: itkWriteImage.h:32
void SetOutputCDF(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:195
void SetRightBreast(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:167
void SetOutputImageMax(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:196
InternalImageType::Pointer imPectoralVoxels
Definition: itkBreastMaskSegmentationFromMRI.h:365
void SetOutputSmoothedStructural(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:190
Definition: niftkITKAffineResampleImage.cxx:74
InputPixelType InternalType
Definition: itkBreastMaskSegmentationFromMRI.h:277
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
float fMarchingK1
Definition: itkBreastMaskSegmentationFromMRI.h:319
GLdouble GLdouble t
Definition: glew.h:1382
float fMarchingK2
Definition: itkBreastMaskSegmentationFromMRI.h:320
void SetSigmaBIF(float sig)
Definition: itkBreastMaskSegmentationFromMRI.h:188
itk::CurvatureAnisotropicDiffusionImageFilter< InternalImageType, InternalImageType > SmoothingFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:130
itk::Vector< RealType, DataDimension > VectorType
Definition: itkBreastMaskSegmentationFromMRI.h:105
Apply a filter or a pipeline slice by slice on an image.
Definition: itkSliceBySliceImageFilterPatched.h:80
itk::BinaryThresholdImageFilter< InternalImageType, InternalImageType > ThresholdingFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:143
itk::ImageRegionIterator< InternalImageType > IteratorType
Definition: itkBreastMaskSegmentationFromMRI.h:114
InternalImageType::Pointer imBIFs
Definition: itkBreastMaskSegmentationFromMRI.h:360
void SetBackgroundThreshold(float threshold)
Definition: itkBreastMaskSegmentationFromMRI.h:175
Definition: itkBreastMaskSegmentationFromMRI.h:158
void SetOutputBackground(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:198
InternalImageType::IndexType idxNippleRight
Definition: itkBreastMaskSegmentationFromMRI.h:383
GLuint in
Definition: glew.h:10220
void WriteSegmentationToAFile(std::string fileOutput)
Write the segmented image to a file.
Definition: itkBreastMaskSegmentationFromMRI.h:248
bool flgRegGrowYcoord
Definition: itkBreastMaskSegmentationFromMRI.h:298
SmartPointer< const Self > ConstPointer
Definition: itkBreastMaskSegmentationFromMRI.h:92
static ExternalType Get(const InternalType &in)
Definition: itkBreastMaskSegmentationFromMRI.h:280
GLdouble GLdouble GLdouble GLdouble q
Definition: glew.h:1398
bool flgLeft
Definition: itkBreastMaskSegmentationFromMRI.h:293
bool flgSmooth
Definition: itkBreastMaskSegmentationFromMRI.h:292
void SetOutputSkinSurfaceNoBreasts(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:218
Lewis Griffin's implementation of a recursive Gaussian filter which does not produce the oscillations...
Definition: itkLewisGriffinRecursiveGaussianImageFilter.h:30
bool flgExtInitialPect
Definition: itkBreastMaskSegmentationFromMRI.h:295
DerivativeFilterType::Pointer DerivativeFilterPointer
Definition: itkBreastMaskSegmentationFromMRI.h:148
itk::Image< InputPixelType, ImageDimension > InternalImageType
Definition: itkBreastMaskSegmentationFromMRI.h:102
void SetCoilCropDistance(float cropDist)
Definition: itkBreastMaskSegmentationFromMRI.h:184
void SetOutputSmoothedFatSat(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:191
float InputPixelType
Definition: niftkCTEPrepareVolumes.cxx:33
std::string fileOutputGradientMagImage
Definition: itkBreastMaskSegmentationFromMRI.h:345
std::string fileOutputSmoothedStructural
Definition: itkBreastMaskSegmentationFromMRI.h:332
bool flgExcludeAxilla
Definition: itkBreastMaskSegmentationFromMRI.h:302
bool flgRegGrowXcoord
Definition: itkBreastMaskSegmentationFromMRI.h:297
PointSetType::PointsContainer PointsContainer
Definition: itkBreastMaskSegmentationFromMRI.h:109
PointSetType::PointDataContainer PointDataContainer
Definition: itkBreastMaskSegmentationFromMRI.h:111
InternalImageType::Pointer imMaxClosed
Definition: itkBreastMaskSegmentationFromMRI.h:364
PointDataContainer::Iterator PointDataIterator
Definition: itkBreastMaskSegmentationFromMRI.h:112
SmartPointer< Self > Pointer
Definition: itkBreastMaskSegmentationFromMRI.h:91
void SetSigmaInMM(float sigma)
Definition: itkBreastMaskSegmentationFromMRI.h:178
InternalImageType::IndexType GetMidSternumIndex(void)
Definition: itkBreastMaskSegmentationFromMRI.h:236
float maxIntensity
Definition: itkBreastMaskSegmentationFromMRI.h:310
InternalImageType::IndexType idxLeftBreastMidPoint
Landmarks used by the segmentation.
Definition: itkBreastMaskSegmentationFromMRI.h:390
void SetOutputSpeedImage(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:206
enumBreastSideType
Breast side.
Definition: itkBreastMaskSegmentationFromMRI.h:156
bool flgVerbose
Definition: itkBreastMaskSegmentationFromMRI.h:290
std::string fileOutputFittedBreastMask
Definition: itkBreastMaskSegmentationFromMRI.h:351
Label pixels that are connected to a seed and lie within a range of values.
Definition: itkRegionGrowSurfacePoints.h:36
Object Superclass
Definition: itkBreastMaskSegmentationFromMRI.h:90
float fMarchingTime
Definition: itkBreastMaskSegmentationFromMRI.h:321
float finalSegmThreshold
Definition: itkBreastMaskSegmentationFromMRI.h:315
std::string fileOutputSkinSurfaceNoBreasts
Definition: itkBreastMaskSegmentationFromMRI.h:356
void SetOutputImageMaxClosed(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:197
void SetOutputPectoralMask(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:202
float RealType
Definition: itkBreastMaskSegmentationFromMRI.h:100
InternalImageType::Pointer imSpeedFuncInputImage
Definition: itkBreastMaskSegmentationFromMRI.h:362
GLfloat GLfloat p
Definition: glew.h:14169
std::string fileOutputSmoothedFatSat
Definition: itkBreastMaskSegmentationFromMRI.h:333
InternalImageType::IndexType idxLeftPosterior
Definition: itkBreastMaskSegmentationFromMRI.h:393
void SetOutputSkinElevationMap(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:217
ImageType::RegionType RegionType
Definition: niftkMakeLapUSProbeBasicModel.cxx:30
void SetExcludeAxilla(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:211
void SetStructuralImage(typename InternalImageType::Pointer image)
Definition: itkBreastMaskSegmentationFromMRI.h:221
void SetVerbose(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:163
void SetMarchingK2(float k2)
Definition: itkBreastMaskSegmentationFromMRI.h:181
InternalImageType::IndexType idxMidSternum
Breast Landmarks.
Definition: itkBreastMaskSegmentationFromMRI.h:381
InternalImageType::Pointer imSegmented
Definition: itkBreastMaskSegmentationFromMRI.h:368
void SetOutputBreastFittedSurfMask(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:213
itk::SliceBySliceImageFilter< InternalImageType, InternalImageType > SliceBySliceImageFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:125
std::string fileOutputClosedStructural
Definition: itkBreastMaskSegmentationFromMRI.h:334
float minIntensity
Definition: itkBreastMaskSegmentationFromMRI.h:311
itk::ImageRegionIteratorWithIndex< InternalImageType > IteratorWithIndexType
Definition: itkBreastMaskSegmentationFromMRI.h:115
itk::GradientMagnitudeRecursiveGaussianImageFilter< InternalImageType, InternalImageType > GradientFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:134
bool flgCropWithFittedSurface
Definition: itkBreastMaskSegmentationFromMRI.h:301
void SetOutputVTKSurface(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:215
Definition: itkBreastMaskSegmentationFromMRI.h:259
itk::Image< RealType, SliceDimension > AxialImageType
Definition: itkBreastMaskSegmentationFromMRI.h:103
int regGrowZcoord
Definition: itkBreastMaskSegmentationFromMRI.h:308
std::string fileOutputPectoralSurfaceVoxels
Definition: itkBreastMaskSegmentationFromMRI.h:349
float coilCropDistance
Definition: itkBreastMaskSegmentationFromMRI.h:325
InternalImageType::Pointer imPectoralSurfaceVoxels
Definition: itkBreastMaskSegmentationFromMRI.h:366
std::string fileOutputRayleigh
Definition: itkBreastMaskSegmentationFromMRI.h:336
float bgndThresholdProb
Definition: itkBreastMaskSegmentationFromMRI.h:313
itk::BasicImageFeaturesImageFilter< InputSliceType, InputSliceType > BasicImageFeaturesFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:123
std::string fileOutputMaxClosedImage
Definition: itkBreastMaskSegmentationFromMRI.h:339
itk::RegionGrowSurfacePoints< InternalImageType, InternalImageType > ConnectedSurfaceVoxelFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:127
void SetFatSatImage(typename InternalImageType::Pointer image)
Definition: itkBreastMaskSegmentationFromMRI.h:223
InternalImageType::Pointer GetSegmentedImage(void)
Definition: itkBreastMaskSegmentationFromMRI.h:243
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:10629
void SetCropFit(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:212
itk::ImageSliceIteratorWithIndex< InternalImageType > SliceIteratorType
Definition: itkBreastMaskSegmentationFromMRI.h:116
2D image filter class to compute basic image features (BIFs) on an image.
Definition: itkBasicImageFeaturesImageFilter.h:42
void SetOutputFit(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:194
InternalImageType::IndexType GetLeftNippleIndex(void)
Definition: itkBreastMaskSegmentationFromMRI.h:228
InternalImageType::RegionType m_LeftLateralRegion
The left side of the image.
Definition: itkBreastMaskSegmentationFromMRI.h:375
std::string fileOutputSkinElevationMap
Definition: itkBreastMaskSegmentationFromMRI.h:355
void SetOutputBIFS(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:187
void SetMarchingK1(float k1)
Definition: itkBreastMaskSegmentationFromMRI.h:180
bool flgRegGrowZcoord
Definition: itkBreastMaskSegmentationFromMRI.h:299
InternalImageType::IndexType idxNippleLeft
Definition: itkBreastMaskSegmentationFromMRI.h:384
void SetMarchingTime(float t)
Definition: itkBreastMaskSegmentationFromMRI.h:182
InternalImageType::Pointer imMaximum
Definition: itkBreastMaskSegmentationFromMRI.h:363
InternalImageType::Pointer imFatSat
Definition: itkBreastMaskSegmentationFromMRI.h:359
itk::ImageDuplicator< InternalImageType > DuplicatorType
Definition: itkBreastMaskSegmentationFromMRI.h:120
itk::SigmoidImageFilter< InternalImageType, InternalImageType > SigmoidFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:137
void SetOutputFastMarchingImage(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:207
InternalImageType::Pointer imChestSurfaceVoxels
Definition: itkBreastMaskSegmentationFromMRI.h:367
std::string fileOutputBIFs
Definition: itkBreastMaskSegmentationFromMRI.h:330
SmartPointer< Self > Pointer
Definition: itkLewisGriffinRecursiveGaussianImageFilter.h:37
unsigned int i
Definition: itkBreastMaskSegmentationFromMRI.h:304
Definition: itkBreastMaskSegmentationFromMRI.h:274
void SetOutputChestPoints(std::string fn)
Definition: itkBreastMaskSegmentationFromMRI.h:199
float cropDistPosteriorToMidSternum
Definition: itkBreastMaskSegmentationFromMRI.h:326
bool flgRight
Definition: itkBreastMaskSegmentationFromMRI.h:294
InternalImageType::IndexType idxRightPosterior
Definition: itkBreastMaskSegmentationFromMRI.h:394
InternalImageType::IndexType idxRightBreastMidPoint
Definition: itkBreastMaskSegmentationFromMRI.h:391
bool flgXML
Definition: itkBreastMaskSegmentationFromMRI.h:291
GLsizei const GLcharARB ** string
Definition: glew.h:5194
float sigmaInMM
Definition: itkBreastMaskSegmentationFromMRI.h:317
std::string fileOutputPectoralSurfaceMask
Definition: itkBreastMaskSegmentationFromMRI.h:341
std::string fileOutputSpeedImage
Definition: itkBreastMaskSegmentationFromMRI.h:346
std::string fileOutputFastMarchingImage
Definition: itkBreastMaskSegmentationFromMRI.h:347
itk::LewisGriffinRecursiveGaussianImageFilter< InternalImageType, InternalImageType > DerivativeFilterType
Definition: itkBreastMaskSegmentationFromMRI.h:146
void SetSmooth(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:164
std::string fileOutputFreqLessBgndCDF
Definition: itkBreastMaskSegmentationFromMRI.h:337
void SetLeftBreast(bool flag)
Definition: itkBreastMaskSegmentationFromMRI.h:166
InternalImageType::Pointer imStructural
Definition: itkBreastMaskSegmentationFromMRI.h:358
void SetBIFImage(typename InternalImageType::Pointer image)
Definition: itkBreastMaskSegmentationFromMRI.h:225
GLclampf f
Definition: glew.h:3136
InternalImageType::IndexType GetRightNippleIndex(void)
Definition: itkBreastMaskSegmentationFromMRI.h:232
void SetRegionGrowX(int coord)
Definition: itkBreastMaskSegmentationFromMRI.h:171