[Insight-developers] itk-snap problem

Chunyan Jiang chunyan.jiang at gmail.com
Sun Jan 15 07:35:13 EST 2006


Dear itk developers,
I tried to use itk-snap to segment image. I find one problem. I use
intensity region snake.  I use IRISSliceWindow to draw a polygon as input,
and also draw a bubble inside the target region. Both polygon and bubble are
set as label color, and set to be initialization of level set
m_SnakeInitializationWrapper in
SNAPImageData
::InitializeSegmentation(
  const SnakeParameters &parameters,
  const std::vector<Bubble> &bubbles, unsigned int labelColor)

But when I run segmentation, only bubble region expends inside target region
(or shrinks outside of target region), the polygon region always shrinks
either inside or outside, till disappears. Simple to say, only bubble
initializing level set work, but polygon initializing doesn't work.

But in the code, SNAPImageData
::InitializeSegmentation

  // Convert the input label image into a binary function whose 0 level set
  // is the boundary of the current label's region
  while(!itSource.IsAtEnd())
    {
    if(itSource.Value() == m_SnakeColorLabel)
      {
      // Expand the bounding box accordingly
      Vector3l point(itTarget.GetIndex().GetIndex());
      bbLower = vector_min(bbLower,point);
      bbUpper = vector_max(bbUpper,point);

      // Increase the number of initialization voxels
      nInitVoxels++;

      // Set the target value to inside (-1.0)
      itTarget.Value() = -1.0f;
      }

    // Go to the next pixel
    ++itTarget; ++itSource;
    }

In SNAPImageData.cxx line 227 to 247, the lable image is polygon drawing.

Why it doesn't work?

I use the InsightApplications-2.4.0. Has it been solved in later version?

Best

Chunyn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20060115/e44bb02b/attachment.htm


More information about the Insight-developers mailing list