19 #include <mitkImageStatisticsCalculator.h>
20 #include <mitkExtendedLabelStatisticsImageFilter.h>
27 #include <itkImageRegionConstIterator.h>
29 #include <boost/accumulators/accumulators.hpp>
30 #include <boost/accumulators/statistics/stats.hpp>
31 #include <boost/accumulators/statistics/mean.hpp>
32 #include <boost/accumulators/statistics/variance.hpp>
33 #include <boost/accumulators/statistics/min.hpp>
34 #include <boost/accumulators/statistics/max.hpp>
35 #include <boost/accumulators/statistics/count.hpp>
36 #include <boost/accumulators/statistics/moment.hpp>
42 int main(
int argc,
char* argv[] )
44 unsigned int timeStep = 0;
45 std::string inputImageFile, maskImageFile;
46 inputImageFile =
"/home/fabian/MITK/MITK_platform_project/bin/MITK-superbuild/MITK-Data/Pic3D.nrrd";
47 maskImageFile =
"/home/fabian/MITK/MITK_platform_project/bin/MITK-superbuild/MITK-Data/Pic3D_someSegmentation.nrrd";
56 std::cout <<
"calculating statistics (unmasked) itk: " << std::endl;
60 imgMaskGen->SetImageMask(maskImage);
62 calculator->SetMask(imgMaskGen.GetPointer());
63 calculator->SetInputImage(inputImage);
64 calculator->SetNBinsForHistogramStatistics(100);
66 for (
unsigned int i=0; i < inputImage->GetTimeSteps(); i++)
68 std::cout <<
"Results for time step " << i <<
":" << std::endl;
69 result = calculator->GetStatistics(i, 1);
71 std::cout << std::endl;
79 imgMaskGen->SetTimeStep(2);
int main(int argc, char *argv[])
Follow Up Storage - Class to facilitate loading/accessing structured follow-up data.
itk::SmartPointer< Self > Pointer
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.