File: OutputFactory.cpp

package info (click to toggle)
mriconvert 1%3A2.1.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488 kB
  • sloc: cpp: 17,029; makefile: 11
file content (74 lines) | stat: -rw-r----- 1,329 bytes parent folder | download | duplicates (4)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// OutputFactory.cpp
/**
 */

#include "OutputFactory.h"

using namespace jcs;

OutputterBase*
OutputFactory::CreateNewOutputter(int type)
{
	OutputterBase* pOutputter;

	switch (type) {

		case SPM :
			pOutputter = new NewSpmOutputter();
			break;

		case META :
			pOutputter = new NewMetaOutputter();
			break;

		case NIFTI :
			pOutputter = new NiftiOutputter();
			break;

		case ANALYZE :
			pOutputter = new AnalyzeOutputter();
			break;

		case FSL :
			pOutputter = new FslNiftiOutputter();
			break;

		case BV :
			pOutputter = new NewBvOutputter();
			break;

		default :
			pOutputter = new NewSpmOutputter();
		}

	return pOutputter;
}


const char*
OutputFactory::GetDescription(int type)
{
	switch (type) {
		case SPM : return "SPM Analyze";
		case META: return "Meta Image";
		case NIFTI: return "NIfTI";
		case ANALYZE: return "Analyze 7.5";
		case FSL: return "FSL NIfTI";
		case BV: return "BrainVoyager";
		default : return "Unknown type";
	}
}

const char*
OutputFactory::GetShortDescription(int type)
{
	switch (type) {
		case SPM : return "spm";
		case META: return "meta";
		case NIFTI: return "nifti";
		case ANALYZE: return "analyze";
		case FSL: return "fsl";
		case BV: return "bv";
		default : return "Unknown type";
	}
}