Simplicity
Simplicity

Reputation: 48946

itk - segmentation of 3D images

Inside the InsightToolkit directory there is the Examples/Segmentation/ConnectedThresholdImageFilter.xx file.

Now, I want to make it operate on a three dimensional image. In this case, will the changes that I have to do bee applied to those lines of code (lines 102-110):

int main( int argc, char *argv[])
{
  if( argc < 7 )
    {
    std::cerr << "Missing Parameters " << std::endl;
    std::cerr << "Usage: " << argv[0];
    std::cerr << " inputImage  outputImage seedX seedY lowerThreshold upperThreshold" << std::endl;
    return 1;
    }
}

And, in order to do that, should I add the following seedZ to:

std::cerr << " inputImage  outputImage seedX seedY lowerThreshold upperThreshold" << std::endl;

And, what change should I perform to the arguments in this case?

Upvotes: 0

Views: 1277

Answers (1)

lopezbertoni
lopezbertoni

Reputation: 3641

You need to add a z parameter like you mentioned in your post.

Then in the example, you need to make sure that the inputImage and the outputImage are set to be 3D. I don't have the code for the example but somewhere along the lines of:

typedef itk::Image< PixelType, 3 > InputImageType;

Hope this helps

Upvotes: 1

Related Questions