-
Notifications
You must be signed in to change notification settings - Fork 218
/
Copy pathMSRGMultiCriteriaHelper.h
58 lines (44 loc) · 2.17 KB
/
MSRGMultiCriteriaHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*=========================================================================
Program: OsiriX
Copyright (c) OsiriX Team
All rights reserved.
Distributed under GNU - GPL
See http://www.osirix-viewer.com/copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
=========================================================================*/
#ifndef __MSRGMultiCriteriaHelper_h
#define __MSRGMultiCriteriaHelper_h
#include "itkImage.h"
#include "itkMultiResolutionPyramidImageFilter.h"
#include "itkResampleImageFilter.h"
#include "itkAffineTransform.h"
#include "itkNearestNeighborInterpolateImageFunction.h"
#include "itkImageRegionConstIterator.h"
#include "itkImageRegionIterator.h"
template <class TInputImage, class TOutputImage> class MSRGMultiCriteriaHelper
{
public:
typedef TInputImage ImageType;
typedef TOutputImage OutputImageType;
typedef typename ImageType::Pointer InputImagePointer;
typedef typename TInputImage::PixelType PixelType;
typedef typename TInputImage::IndexType InputImageIndex;
typedef typename OutputImageType::Pointer OutputImagePointer;
typedef typename OutputImageType::PixelType OutputPixelType;
// build a MultiResolution from inputImage => to outputImage (CriteriaImage), the number of levels is deduced from CriteriaImage Pixel depth ..
static void MultiResolutionPyramid(const ImageType* inputImage,OutputImageType* outputImage);
// build a VectorialImage from a standard inputImage ..
static void buildVectorialImage(const ImageType* inputImage,OutputImageType* outputImage);
static void buildVectorialImageFromRGB(const ImageType* inputImage,OutputImageType* outputImage);
// image Extraction from the criteria (vectorial image) => the InputImage at the specified level
static OutputImagePointer ExtractImageFromVectorialImageAtSlice(const ImageType* inputImage, int level);
// extract and save all the criteria images (inputImage) ...
//TODO add the format png, ect ... as a parameter !!
static void saveAllSlices(const ImageType* inputImage);
};
#ifndef ITK_MANUAL_INSTANTIATION
#include "MSRGMultiCriteriaHelper.txx"
#endif
#endif