15 #ifndef ImageStatisticsView_h
16 #define ImageStatisticsView_h
18 #include <berryISelectionListener.h>
20 #include <QmitkAbstractView.h>
22 #include "ui_ImageStatisticsViewControls.h"
46 typedef QmitkAbstractView Superclass;
60 const QList<mitk::DataNode::Pointer>& nodes )
override;
91 void RetrievePreferenceValues();
94 void EnableControls(
bool enabled);
97 bool IsSelectionValid(
const QList<mitk::DataNode::Pointer>& nodes);
100 void InitializeTable();
103 void Update(
const QList<mitk::DataNode::Pointer>& nodes);
106 template <
typename PixelType>
107 QTreeWidgetItem* CreateTableRow(QTreeWidgetItem* parentItem,
108 const QString&
value,
119 template <
typename PixelType,
unsigned int VImageDimension>
121 itk::Image<PixelType, VImageDimension>* itkImage,
122 std::set<PixelType>& labels);
126 template <
typename PixelType,
unsigned int VImageDimension>
128 itk::Image<PixelType, VImageDimension>* itkImage,
133 template <
typename TPixel>
142 template <
typename TPixel>
153 void CalculateMeanAndStdDev(
163 template <
typename TPixel>
164 void AccumulateValue(
173 TPixel* imagePixelsCopy
179 template <
typename TPixel1,
typename TPixel2>
180 void AccumulateValue(
182 TPixel2 valueToCompareMaskAgainst,
192 TPixel1* imagePixelsCopy
196 template <
typename TPixel,
unsigned VImageDimension>
198 itk::Image<TPixel, VImageDimension>* itkImage,
199 const itk::ImageRegion<VImageDimension>& region,
208 TPixel* imagePixelsCopy,
216 template <
typename TPixel1,
typename TPixel2,
unsigned int VImageDimension>
217 void CalculateStatsWithMask(
218 itk::Image<TPixel1, VImageDimension>* itkImage,
219 itk::Image<TPixel2, VImageDimension>* itkMask,
220 const itk::ImageRegion<VImageDimension>& region,
231 TPixel1* imagePixelsCopy,
238 template <
typename TPixel,
unsigned int VImageDimension>
240 itk::Image<TPixel, VImageDimension>* itkImage
246 template <
typename TPixel1,
unsigned int VImageDimension1,
typename TPixel2,
unsigned int VImageDimension2>
247 void UpdateTableWithMask(
248 itk::Image<TPixel1, VImageDimension1>* itkImage,
249 itk::Image<TPixel2, VImageDimension2>* itkMask
254 bool eventFilter(QObject*
object, QEvent*
event)
override;
256 Ui::ImageStatisticsViewControls m_Controls;
258 bool m_RequireSameSizeImage;
260 int m_BackgroundValue;
261 mitk::DataNode::Pointer m_MaskNode;
262 mitk::DataNode::Pointer m_ImageNode;
263 bool m_PerSliceStats;
GLuint counter
Definition: glew.h:2637
void OnUpdateButtonClicked()
Checks to see if there is a valid selection, and if so, triggers Update with the currently selected n...
Definition: ImageStatisticsView.cxx:245
GLenum GLsizei const GLuint GLboolean enabled
Definition: glew.h:2537
Orientation
Definition: itkMIDASHelper.h:35
Provides simple image statistics over an image, or a region of interest.
Definition: ImageStatisticsView.h:42
virtual void SetFocus() override
Definition: ImageStatisticsView.cxx:63
void OnCopyAllButtonClicked()
Selects every row in the table and copies them to the clipboard.
Definition: ImageStatisticsView.cxx:1002
void OnCoronalRadioButtonToggled(bool toggled)
Definition: ImageStatisticsView.cxx:967
ImageStatisticsView()
Definition: ImageStatisticsView.cxx:43
static const QString VIEW_ID
Definition: ImageStatisticsView.h:54
virtual ~ImageStatisticsView()
Definition: ImageStatisticsView.cxx:57
void OnSagittalRadioButtonToggled(bool toggled)
Definition: ImageStatisticsView.cxx:955
GLsizei const GLfloat * value
Definition: glew.h:1833
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
GLuint GLuint GLsizei count
Definition: glew.h:1237
berryObjectMacro(ImageStatisticsView)
GLboolean invert
Definition: glew.h:1406
Provides useful utility functions that could be used in multiple ITK filters.
GLuint GLsizei GLsizei GLchar * label
Definition: glew.h:10629
cl_event event
Definition: glew.h:3231
virtual void OnPreferencesChanged(const berry::IBerryPreferences *) override
BlueBerry's notification about preference changes (e.g. from a preferences dialog).
Definition: ImageStatisticsView.cxx:111
void OnPerSliceStatsCheckBoxToggled(bool toggled)
Definition: ImageStatisticsView.cxx:931
virtual void OnSelectionChanged(berry::IWorkbenchPart::Pointer source, const QList< mitk::DataNode::Pointer > &nodes) override
called by QmitkAbstractView when DataManager's selection has changed
Definition: ImageStatisticsView.cxx:136
virtual void CreateQtPartControl(QWidget *parent) override
Definition: ImageStatisticsView.cxx:69
void OnAxialRadioButtonToggled(bool toggled)
Definition: ImageStatisticsView.cxx:943
GLsizei GLsizei GLchar * source
Definition: glew.h:1816