StructureEnum.h
#ifndef __STRUCTURE_ENUM__H_
#define __STRUCTURE_ENUM__H_
/*LICENSE_START*/
/*
* Copyright (c) 2014, Washington University School of Medicine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "Common/AString.h"
#include <stdint.h>
#include <vector>
namespace cifti {
class StructureEnum {
public:
enum Enum {
INVALID,
ALL,
ALL_WHITE_MATTER,
ALL_GREY_MATTER,
ACCUMBENS_LEFT,
ACCUMBENS_RIGHT,
AMYGDALA_LEFT,
AMYGDALA_RIGHT,
BRAIN_STEM,
CAUDATE_LEFT,
CAUDATE_RIGHT,
CEREBELLAR_WHITE_MATTER_LEFT,
CEREBELLAR_WHITE_MATTER_RIGHT,
CEREBELLUM,
CEREBELLUM_LEFT,
CEREBELLUM_RIGHT,
CEREBRAL_WHITE_MATTER_LEFT,
CEREBRAL_WHITE_MATTER_RIGHT,
CORTEX,
CORTEX_LEFT,
CORTEX_RIGHT,
DIENCEPHALON_VENTRAL_LEFT,
DIENCEPHALON_VENTRAL_RIGHT,
HIPPOCAMPUS_LEFT,
HIPPOCAMPUS_RIGHT,
PALLIDUM_LEFT,
PALLIDUM_RIGHT,
OTHER,
OTHER_GREY_MATTER,
OTHER_WHITE_MATTER,
PUTAMEN_LEFT,
PUTAMEN_RIGHT,
THALAMUS_LEFT,
THALAMUS_RIGHT
};
~StructureEnum();
static AString toName(Enum enumValue);
static Enum fromName(const AString& name, bool* isValidOut);
static AString toGuiName(Enum enumValue);
static Enum fromGuiName(const AString& guiName, bool* isValidOut);
static AString toCiftiName(Enum enumValue);
static Enum fromCiftiName(const AString& ciftiName, bool* isValidOut);
static void getAllEnums(std::vector<Enum>& allEnums);
static bool isRight(const Enum enumValue);
static bool isLeft(const Enum enumValue);
static bool isCortexContralateral(const Enum enumValueA,
const Enum enumValueB);
static Enum getContralateralStructure(const Enum enumValue);
private:
StructureEnum(const Enum enumValue,
const AString& name,
const AString& guiName);
static const StructureEnum* findData(const Enum enumValue);
static std::vector<StructureEnum> enumData;
static void initialize();
static bool initializedFlag;
Enum enumValue;
AString name;
AString guiName;
};
} // namespace
#endif //__STRUCTURE_ENUM__H_
cifti::StructureEnum
Enumerated type for a structure in a brain.
Definition StructureEnum.h:43
cifti::StructureEnum::getAllEnums
static void getAllEnums(std::vector< Enum > &allEnums)
Definition StructureEnum.cxx:401
cifti::StructureEnum::fromName
static Enum fromName(const AString &name, bool *isValidOut)
Definition StructureEnum.cxx:261
cifti::StructureEnum::toName
static AString toName(Enum enumValue)
Definition StructureEnum.cxx:244
cifti::StructureEnum::~StructureEnum
~StructureEnum()
Definition StructureEnum.cxx:64
cifti::StructureEnum::toCiftiName
static AString toCiftiName(Enum enumValue)
Definition StructureEnum.cxx:346
cifti::StructureEnum::getContralateralStructure
static Enum getContralateralStructure(const Enum enumValue)
Definition StructureEnum.cxx:562
cifti::StructureEnum::fromGuiName
static Enum fromGuiName(const AString &guiName, bool *isValidOut)
Definition StructureEnum.cxx:312
cifti::StructureEnum::isRight
static bool isRight(const Enum enumValue)
Definition StructureEnum.cxx:427
cifti::StructureEnum::fromCiftiName
static Enum fromCiftiName(const AString &ciftiName, bool *isValidOut)
Definition StructureEnum.cxx:363
cifti::StructureEnum::isLeft
static bool isLeft(const Enum enumValue)
Definition StructureEnum.cxx:480
cifti::StructureEnum::toGuiName
static AString toGuiName(Enum enumValue)
Definition StructureEnum.cxx:295
cifti::StructureEnum::isCortexContralateral
static bool isCortexContralateral(const Enum enumValueA, const Enum enumValueB)
Definition StructureEnum.cxx:537
cifti::StructureEnum::Enum
Enum
Definition StructureEnum.h:49
cifti::StructureEnum::CEREBRAL_WHITE_MATTER_RIGHT
@ CEREBRAL_WHITE_MATTER_RIGHT
Definition StructureEnum.h:85
cifti::StructureEnum::OTHER_GREY_MATTER
@ OTHER_GREY_MATTER
Definition StructureEnum.h:107
cifti::StructureEnum::BRAIN_STEM
@ BRAIN_STEM
Definition StructureEnum.h:67
cifti::StructureEnum::CEREBELLUM
@ CEREBELLUM
Definition StructureEnum.h:77
cifti::StructureEnum::PALLIDUM_LEFT
@ PALLIDUM_LEFT
Definition StructureEnum.h:101
cifti::StructureEnum::HIPPOCAMPUS_LEFT
@ HIPPOCAMPUS_LEFT
Definition StructureEnum.h:97
cifti::StructureEnum::THALAMUS_LEFT
@ THALAMUS_LEFT
Definition StructureEnum.h:115
cifti::StructureEnum::CEREBELLUM_RIGHT
@ CEREBELLUM_RIGHT
Definition StructureEnum.h:81
cifti::StructureEnum::ALL_WHITE_MATTER
@ ALL_WHITE_MATTER
Definition StructureEnum.h:55
cifti::StructureEnum::ACCUMBENS_LEFT
@ ACCUMBENS_LEFT
Definition StructureEnum.h:59
cifti::StructureEnum::AMYGDALA_LEFT
@ AMYGDALA_LEFT
Definition StructureEnum.h:63
cifti::StructureEnum::CEREBELLAR_WHITE_MATTER_LEFT
@ CEREBELLAR_WHITE_MATTER_LEFT
Definition StructureEnum.h:73
cifti::StructureEnum::CEREBELLUM_LEFT
@ CEREBELLUM_LEFT
Definition StructureEnum.h:79
cifti::StructureEnum::AMYGDALA_RIGHT
@ AMYGDALA_RIGHT
Definition StructureEnum.h:65
cifti::StructureEnum::CAUDATE_RIGHT
@ CAUDATE_RIGHT
Definition StructureEnum.h:71
cifti::StructureEnum::OTHER
@ OTHER
Definition StructureEnum.h:105
cifti::StructureEnum::DIENCEPHALON_VENTRAL_LEFT
@ DIENCEPHALON_VENTRAL_LEFT
Definition StructureEnum.h:93
cifti::StructureEnum::DIENCEPHALON_VENTRAL_RIGHT
@ DIENCEPHALON_VENTRAL_RIGHT
Definition StructureEnum.h:95
cifti::StructureEnum::CEREBELLAR_WHITE_MATTER_RIGHT
@ CEREBELLAR_WHITE_MATTER_RIGHT
Definition StructureEnum.h:75
cifti::StructureEnum::CORTEX
@ CORTEX
Definition StructureEnum.h:87
cifti::StructureEnum::THALAMUS_RIGHT
@ THALAMUS_RIGHT
Definition StructureEnum.h:117
cifti::StructureEnum::INVALID
@ INVALID
Definition StructureEnum.h:51
cifti::StructureEnum::CORTEX_RIGHT
@ CORTEX_RIGHT
Definition StructureEnum.h:91
cifti::StructureEnum::PUTAMEN_LEFT
@ PUTAMEN_LEFT
Definition StructureEnum.h:111
cifti::StructureEnum::OTHER_WHITE_MATTER
@ OTHER_WHITE_MATTER
Definition StructureEnum.h:109
cifti::StructureEnum::CAUDATE_LEFT
@ CAUDATE_LEFT
Definition StructureEnum.h:69
cifti::StructureEnum::PALLIDUM_RIGHT
@ PALLIDUM_RIGHT
Definition StructureEnum.h:103
cifti::StructureEnum::CEREBRAL_WHITE_MATTER_LEFT
@ CEREBRAL_WHITE_MATTER_LEFT
Definition StructureEnum.h:83
cifti::StructureEnum::HIPPOCAMPUS_RIGHT
@ HIPPOCAMPUS_RIGHT
Definition StructureEnum.h:99
cifti::StructureEnum::ALL
@ ALL
Definition StructureEnum.h:53
cifti::StructureEnum::ACCUMBENS_RIGHT
@ ACCUMBENS_RIGHT
Definition StructureEnum.h:61
cifti::StructureEnum::PUTAMEN_RIGHT
@ PUTAMEN_RIGHT
Definition StructureEnum.h:113
cifti::StructureEnum::CORTEX_LEFT
@ CORTEX_LEFT
Definition StructureEnum.h:89
cifti::StructureEnum::ALL_GREY_MATTER
@ ALL_GREY_MATTER
Definition StructureEnum.h:57
cifti
namespace for all CiftiLib functionality
Definition CiftiBrainModelsMap.h:42