Hi,
I need to create a mesh from a closed surface. What I did is that to pad the image with tolerance level of 3 pixels padSize,
// pad the input intensity image
PadFilterType::Pointer padFilter=PadFilterType::New();
ImageType::SizeType lowerExtendRegion;
lowerExtendRegion.Fill(padSize); // pad from up-left side lowerBound[0]: pad from left side, lowerbound[1]: pad from up
ImageType::SizeType upperExtendRegion;
upperExtendRegion.Fill(padSize); // pad from the bottom side, upperBound[0]: pad from right side, lowerbound[1]: pad from bottom
padFilter->SetInput(image);
padFilter->SetPadLowerBound(lowerExtendRegion);
padFilter->SetPadUpperBound(upperExtendRegion);
padFilter->SetConstant(0.0); // fill with zero values, default=0
The information of image before padding is size: [166, 347, 82] and start (region.GetIndex()) is [0, 0, 0]
. After padding the information changes to [172, 353, 88] and [-3, -3, -3] respectively.
My question is two-fold:
-
Should I change the start to [0,0,0] for creating mesh and then applying deformable models? If yes, how to change the start information of volume?
-
After performing the required algorithms on the padded image, how to return back the image to the original size and information before padding?
Thank you