void vtkRegionGrowing::Start()
{
	
mVolume->GetExtent(mExt);
createSlice();


int n=mSeeds.size();
for(int i=0; i<n; i++)mQueue.push(mSeeds[i]);

if(mOrientation==0)processX();
if(mOrientation==1)processY();
if(mOrientation==2)processZ();

copySlice();
mSlice->Delete();	
}
예제 #2
0
Box* _listSlice(BoxedList* self, i64 start, i64 stop, i64 step, i64 length) {
    // printf("%ld %ld %ld\n", start, stop, step);
    assert(step != 0);
    if (step > 0) {
        assert(0 <= start);
        assert(stop <= self->size);
    } else {
        assert(start < self->size);
        assert(-1 <= stop);
    }

    BoxedList* rtn = new BoxedList();
    if (length > 0) {
        rtn->ensure(length);
        copySlice(&rtn->elts->elts[0], &self->elts->elts[0], start, step, length);
        rtn->size += length;
    }
    return rtn;
}