IntVec3 SmartCrawler::getRandomDirection(){
    int a = (rand() % 4);
    if (a == 0){
        return IntVec3(1,0,0);
    } else if (a == 1){
        return IntVec3(-1,0,0);
    } else if (a == 2){
        return IntVec3(0,0,1);
    } else{
        return IntVec3(0,0,-1);
    }
}
SpineSegmentationInfo::SpineSegmentationInfo()
{
	bound1 = bound2 = IntVec3(0,0,0);
	sacrum_start = -1;
	t12_vertebra = -1;

}
void SpineSegmentationInfo::Initialize()
{
	bound1 = bound2 = IntVec3(0,0,0);
	avg_cortical_intensity = avg_spongy_intensity = avg_bone_intensity = 0;
	spineBound1.SetSize(0); spineBound2.SetSize(0);
	diskBound1.SetSize(0); diskBound2.SetSize(0);
	cordBound1.SetSize(0); cordBound2.SetSize(0);
	sprocessBound1.SetSize(0); sprocessBound2.SetSize(0);
}