18 #ifndef itkMorphologicalContourInterpolator_h 19 #define itkMorphologicalContourInterpolator_h 21 #include "itkBinaryThresholdImageFilter.h" 22 #include "itkConnectedComponentImageFilter.h" 23 #include "itkExtractImageFilter.h" 24 #include "itkImageToImageFilter.h" 25 #include "itksys/hash_map.hxx" 64 template<
typename TImage >
66 public ImageToImageFilter< TImage, TImage >
68 template<
typename T >
76 typedef Image<
typename TImage::PixelType, TImage::ImageDimension - 1 >
SliceType;
182 typename TImage::PixelType label,
183 const std::vector< typename TImage::IndexValueType >& indices )
237 ImagesEqual(
typename BoolSliceType::Pointer& a,
typename BoolSliceType::Pointer& b );
247 typename TImage::PixelType label,
248 typename TImage::IndexValueType i,
249 typename TImage::IndexValueType j,
252 ThreadIdType threadId );
266 typename TImage::PixelType label,
267 typename TImage::IndexValueType i,
268 typename TImage::IndexValueType j,
270 typename TImage::PixelType iRegionId,
271 ThreadIdType threadId );
282 ThreadIdType threadId );
289 ThreadIdType threadId );
296 ThreadIdType threadId );
302 typename TImage::PixelType label,
303 typename TImage::IndexValueType i,
304 typename TImage::IndexValueType j,
306 typename TImage::PixelType iRegionId,
308 typename TImage::PixelType jRegionId,
309 const typename
SliceType::IndexType& translation,
311 ThreadIdType threadId );
319 typename TImage::PixelType label,
320 typename TImage::IndexValueType i,
321 typename TImage::IndexValueType j,
323 typename TImage::PixelType iRegionId,
326 const typename
SliceType::IndexType& translation,
327 ThreadIdType threadId );
332 const typename
SliceType::IndexType& translation,
333 typename
SliceType::RegionType newRegion );
353 typename
SliceType::RegionType& jRegion );
358 typename TImage::PixelType iRegionId,
361 const typename
SliceType::IndexType& translation );
366 typename TImage::PixelType iRegionId,
370 typedef itksys::hash_map< typename TImage::PixelType, typename TImage::RegionType >
BoundingBoxesType;
382 ExpandRegion( typename T2::RegionType& region, const typename T2::IndexType& index );
387 typename TImage::PixelType label,
388 IdentifierType& objectCount );
406 operator=( const
Self & ) ITK_DELETED_FUNCTION;
410 #ifndef ITK_MANUAL_INSTANTIATION 411 #include "itkMorphologicalContourInterpolator.hxx" 414 #endif // itkMorphologicalContourInterpolator_h IdentifierType CardSymDifference(typename BoolSliceType::Pointer &shape1, typename BoolSliceType::Pointer &shape2)
SliceType::Pointer RegionedConnectedComponents(const typename TImage::RegionType ®ion, typename TImage::PixelType label, IdentifierType &objectCount)
IdentifierType m_MinAlignIters
BinarizerType::Pointer m_Binarizer
friend class MorphologicalContourInterpolatorParallelInvoker
Image< float, TImage::ImageDimension - 1 > FloatSliceType
void IntersectionRegions(const typename SliceType::IndexType &translation, typename SliceType::RegionType &iRegion, typename SliceType::RegionType &jRegion)
std::vector< typename TImage::PixelType > PixelList
MorphologicalContourInterpolator Self
itksys::hash_map< typename TImage::PixelType, typename TImage::RegionType > BoundingBoxesType
BoolSliceType::Pointer FindMedianImageDistances(typename BoolSliceType::Pointer &intersection, typename BoolSliceType::Pointer &iMask, typename BoolSliceType::Pointer &jMask, ThreadIdType threadId)
SliceSetType GetLabeledSliceIndices(unsigned int axis, typename TImage::PixelType label)
void Interpolate1toN(int axis, TImage *out, typename TImage::PixelType label, typename TImage::IndexValueType i, typename TImage::IndexValueType j, typename SliceType::Pointer &iConn, typename TImage::PixelType iRegionId, typename SliceType::Pointer &jConn, const PixelList &jRegionIds, const typename SliceType::IndexType &translation, ThreadIdType threadId)
itkSetMacro(Label, typename TImage::PixelType)
TImage::PixelType m_Label
Simplified inverse ITK transforms.
ConnectedComponentsType::Pointer m_ConnectedComponents
itkTypeMacro(MorphologicalContourInterpolator, ImageToImageFilter)
BoolSliceType::Pointer Dilate1(typename BoolSliceType::Pointer &seed, typename BoolSliceType::Pointer &mask, ThreadIdType threadId)
void Extrapolate(int axis, TImage *out, typename TImage::PixelType label, typename TImage::IndexValueType i, typename TImage::IndexValueType j, typename SliceType::Pointer &iConn, typename TImage::PixelType iRegionId, ThreadIdType threadId)
std::vector< LabeledSlicesType > SliceIndicesType
bool m_HeuristicAlignment
Image< bool, TImage::ImageDimension - 1 > BoolSliceType
void SetLabeledSliceIndices(unsigned int axis, typename TImage::PixelType label, const std::vector< typename TImage::IndexValueType > &indices)
MorphologicalContourInterpolator()
ExtractImageFilter< TImage, SliceType > RoiType
void Interpolate1to1(int axis, TImage *out, typename TImage::PixelType label, typename TImage::IndexValueType i, typename TImage::IndexValueType j, typename SliceType::Pointer &iConn, typename TImage::PixelType iRegionId, typename SliceType::Pointer &jConn, typename TImage::PixelType jRegionId, const typename SliceType::IndexType &translation, bool recursive, ThreadIdType threadId)
std::vector< typename BoolSliceType::Pointer > GenerateDilationSequence(typename BoolSliceType::Pointer &begin, typename BoolSliceType::Pointer &end, ThreadIdType threadId)
void DetermineSliceOrientations()
std::set< typename TImage::IndexValueType > SliceSetType
virtual void GenerateData() ITK_OVERRIDE
bool m_UseBallStructuringElement
itkGetConstMacro(Label, typename TImage::PixelType)
bool ImagesEqual(typename BoolSliceType::Pointer &a, typename BoolSliceType::Pointer &b)
Image< typename TImage::PixelType, TImage::ImageDimension - 1 > SliceType
BoolSliceType::Pointer FindMedianImageDilations(typename BoolSliceType::Pointer &intersection, typename BoolSliceType::Pointer &iMask, typename BoolSliceType::Pointer &jMask, ThreadIdType threadId)
SliceType::IndexType Centroid(typename SliceType::Pointer &conn, const PixelList ®ionIds)
BinaryThresholdImageFilter< SliceType, BoolSliceType > BinarizerType
bool m_UseCustomSlicePositions
SliceType::Pointer TranslateImage(typename SliceType::Pointer &image, const typename SliceType::IndexType &translation, typename SliceType::RegionType newRegion)
FloatSliceType::Pointer MaurerDM(typename BoolSliceType::Pointer &inImage, ThreadIdType threadId)
void SetUseBallStructuringElement(bool useBall)
Interpolates contours between slices. Based on a paper by Albu et al.
SliceIndicesType m_LabeledSlices
IdentifierType m_ThreadCount
ConnectedComponentImageFilter< BoolSliceType, SliceType > ConnectedComponentsType
virtual void AllocateOutputs() ITK_OVERRIDE
Image< bool, TImage::ImageDimension > BoolImageType
itksys::hash_map< typename TImage::PixelType, SliceSetType > LabeledSlicesType
SliceIndicesType GetLabeledSliceIndices()
IdentifierType m_MaxAlignIters
void ExpandRegion(typename T2::RegionType ®ion, const typename T2::IndexType &index)
itkGetMacro(Label, typename TImage::PixelType)
void SetLabeledSliceIndices(unsigned int axis, typename TImage::PixelType label, const SliceSetType &indices)
~MorphologicalContourInterpolator()
BoundingBoxesType m_BoundingBoxes
SliceType::IndexType Align(typename SliceType::Pointer &iConn, typename TImage::PixelType iRegionId, typename SliceType::Pointer &jConn, const PixelList &jRegionIds)
ImageToImageFilter< TImage, TImage > Superclass
void InterpolateBetweenTwo(int axis, TImage *out, typename TImage::PixelType label, typename TImage::IndexValueType i, typename TImage::IndexValueType j, typename SliceType::Pointer &iconn, typename SliceType::Pointer &jconn, ThreadIdType threadId)
SliceType::RegionType BoundingBox(itk::SmartPointer< SliceType > image)
IdentifierType Intersection(typename SliceType::Pointer &iConn, typename TImage::PixelType iRegionId, typename SliceType::Pointer &jConn, const PixelList &jRegionIds, const typename SliceType::IndexType &translation)
void ClearLabeledSliceIndices()
void InterpolateAlong(int axis, TImage *out)
SmartPointer< Self > Pointer
bool m_UseDistanceTransform