18 #ifndef _MITK_PartialVolumeAnalysisHistogramCalculator_H
19 #define _MITK_PartialVolumeAnalysisHistogramCalculator_H
23 #include <itkObject.h>
25 #include <itkTimeStamp.h>
63 MASKING_MODE_NONE = 0,
65 MASKING_MODE_PLANARFIGURE
106 itkFactorylessNewMacro(Self)
110 void SetImage( const
mitk::
Image *image );
113 void SetImageMask( const
mitk::
Image *imageMask );
120 void AddAdditionalResamplingImage( const
mitk::
Image *image );
123 void SetMaskingMode(
unsigned int mode );
126 itkGetMacro( MaskingMode,
unsigned int );
129 void SetMaskingModeToNone();
132 void SetMaskingModeToImage();
135 void SetMaskingModeToPlanarFigure();
138 void SetNumberOfBins(
unsigned int number )
140 if(m_NumberOfBins != number)
142 m_NumberOfBins = number;
149 {
return m_NumberOfBins; }
154 if(m_UpsamplingFactor != number)
156 m_UpsamplingFactor = number;
163 {
return m_UpsamplingFactor; }
168 if(m_GaussianSigma != number)
170 m_GaussianSigma = number;
177 {
return m_PlanarFigureThickness; }
183 if(m_PlanarFigureThickness != number)
185 m_PlanarFigureThickness = number;
192 {
return m_GaussianSigma; }
201 virtual bool ComputeStatistics( );
205 const HistogramType *GetHistogram( )
const;
208 const Statistics &GetStatistics( )
const;
212 return m_InternalImage;
217 if(i < m_InternalAdditionalResamplingImages.size())
219 return m_InternalAdditionalResamplingImages[i];
246 void ExtractImageAndMask( );
253 unsigned int &axis );
255 template <
typename TPixel,
unsigned int VImageDimension >
256 void InternalCalculateStatisticsUnmasked(
257 const itk::Image< TPixel, VImageDimension > *image,
258 Statistics &statistics,
261 template <
typename TPixel,
unsigned int VImageDimension >
262 void InternalCalculateStatisticsMasked(
263 const itk::Image< TPixel, VImageDimension > *image,
264 itk::Image< unsigned char, VImageDimension > *maskImage,
265 Statistics &statistics,
268 template <
typename TPixel,
unsigned int VImageDimension >
269 void InternalCalculateMaskFromPlanarFigure(
270 itk::Image< TPixel, VImageDimension > *image,
unsigned int axis );
272 template <
typename TPixel,
unsigned int VImageDimension >
273 void InternalReorientImagePlane(
276 template <
typename TPixel,
unsigned int VImageDimension >
277 void InternalResampleImageFromMask(
278 const itk::Image< TPixel, VImageDimension > *image,
int additionalIndex );
280 void InternalResampleImage(
281 const MaskImage3DType *image );
283 template <
typename TPixel,
unsigned int VImageDimension >
284 void InternalCropAdditionalImage(
285 itk::Image< TPixel, VImageDimension > *image,
int additionalIndex );
290 template <
typename ITK_Exporter,
typename VTK_Importer>
293 importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());
295 importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());
296 importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());
297 importer->SetSpacingCallback(exporter->GetSpacingCallback());
298 importer->SetOriginCallback(exporter->GetOriginCallback());
299 importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());
301 importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());
303 importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());
304 importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());
305 importer->SetDataExtentCallback(exporter->GetDataExtentCallback());
306 importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());
307 importer->SetCallbackUserData(exporter->GetCallbackUserData());
311 template <
typename VTK_Exporter,
typename ITK_Importer>
314 importer->SetUpdateInformationCallback(exporter->GetUpdateInformationCallback());
316 importer->SetPipelineModifiedCallback(exporter->GetPipelineModifiedCallback());
317 importer->SetWholeExtentCallback(exporter->GetWholeExtentCallback());
318 importer->SetSpacingCallback(exporter->GetSpacingCallback());
319 importer->SetOriginCallback(exporter->GetOriginCallback());
320 importer->SetScalarTypeCallback(exporter->GetScalarTypeCallback());
322 importer->SetNumberOfComponentsCallback(exporter->GetNumberOfComponentsCallback());
324 importer->SetPropagateUpdateExtentCallback(exporter->GetPropagateUpdateExtentCallback());
325 importer->SetUpdateDataCallback(exporter->GetUpdateDataCallback());
326 importer->SetDataExtentCallback(exporter->GetDataExtentCallback());
327 importer->SetBufferPointerCallback(exporter->GetBufferPointerCallback());
328 importer->SetCallbackUserData(exporter->GetCallbackUserData());
331 void UnmaskedStatisticsProgressUpdate();
332 void MaskedStatisticsProgressUpdate();
384 #endif // #define _MITK_PartialVolumeAnalysisHistogramCalculator_H
HistogramType::Pointer m_EmptyHistogram
mitk::Image::HistogramType::ConstIterator HistogramConstIteratorType
itk::ImageRegion< 3 > m_CropRegion
itk::Image< float, 2 > InternalImage2DType
itk::SmartPointer< Self > Pointer
Standard implementation of BaseGeometry.
MaskImage3DType::Pointer m_InternalImageMask3D
unsigned int GetNumberOfBins()
Get histogram number of bins.
bool m_MaskingModeChanged
std::vector< mitk::Image::ConstPointer > m_AdditionalResamplingImages
itk::Image< unsigned char, 3 > MaskImage3DType
TimeStampType m_MaskedImageStatisticsTimeStamp
BoolType m_ImageStatisticsCalculationTriggerBool
DataCollection - Class to facilitate loading/accessing structured data.
mitk::Image::HistogramType HistogramType
void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)
Statistics StatisticsType
StatisticsType m_ImageStatistics
BoolType m_PlanarFigureStatisticsCalculationTriggerBool
std::vector< mitk::Image::Pointer > m_InternalAdditionalResamplingImages
#define MITKDIFFUSIONCORE_EXPORT
itk::SmartPointer< const Self > ConstPointer
itk::Statistics::Histogram< double > HistogramType
HistogramType::ConstPointer m_ImageHistogram
const Image::Pointer GetInternalImage()
Statistics m_EmptyStatistics
TimeStampType m_ImageStatisticsTimeStamp
void SetPlanarFigureThickness(unsigned int number)
Set thickness of planar figure.
BoolType m_MaskedImageStatisticsCalculationTriggerBool
unsigned int m_NumberOfBins
#define mitkClassMacroItkParent(className, SuperClassName)
Image class for storing images.
StatisticsType m_PlanarFigureStatistics
HistogramType::ConstPointer m_MaskedImageHistogram
mitk::Image::Pointer m_InternalImage
itk::Image< unsigned char, 2 > MaskImage2DType
void ConnectPipelines(VTK_Exporter *exporter, ITK_Importer importer)
MaskImage2DType::Pointer m_InternalImageMask2D
itk::ImageRegion< 3 > m_InternalMask3D
unsigned int GetPlanarFigureThickness()
Get thickness of planar figure.
void SetForceUpdate(bool b)
HistogramType::ConstPointer m_PlanarFigureHistogram
const Image::Pointer GetInternalAdditionalResampledImage(unsigned int i)
StatisticsType m_MaskedImageStatistics
TimeStampType m_PlanarFigureStatisticsTimeStamp
unsigned int m_PlanarFigureThickness
void SetGaussianSigma(float number)
Set gaussian sigma.
float GetGaussianSigma()
Get histogram number of bins.
float GetUpsamplingFactor()
Get upsampling factor.
itk::TimeStamp TimeStampType
void SetUpsamplingFactor(float number)
Set upsampling factor.
Class for calculating statistics and histogram for an (optionally masked) image.
unsigned int m_MaskingMode
mitk::Image::ConstPointer m_ImageMask
mitk::Image::ConstPointer m_Image
BaseGeometry Describes the geometry of a data object.
mitk::PlanarFigure::ConstPointer m_PlanarFigure