[Insight-developers] itk-snap problem

Chunyan Jiang chunyan.jiang at gmail.com
Mon Jan 16 04:36:01 EST 2006


Hi Paul,
Thank you for your reply. You are right. The problem might arise from one
pixel thick. When I set it to three pixel thick, the level set works. I add
code to function:
bool IRISSliceWindow::AcceptPolygon()

            idxImage[2]=m_DisplayAxisPosition-1;
            m_Driver->GetCurrentImageData()->SetSegmentationVoxel(idxImage,
drawing_color);
            idxImage[2]=m_DisplayAxisPosition+2;
            m_Driver->GetCurrentImageData()->SetSegmentationVoxel(idxImage,
drawing_color);

Because:
          // Get the index into the image that we'll be updating
          Vector3f idxImageFloat =

MapSliceToImage(Vector3f(idx[0]+0.5f,idx[1]+0.5f,m_DisplayAxisPosition));

          // Convert to integer
          Vector3ui idxImage = to_unsigned_int(idxImageFloat);
idxImage[2] is set to m_DisplayAxisPosition. Therefore, I only change
idxImage[2] to make polygon slice thicker.

But it causes another problem. The polygon initializing segmentation only
works when polygon is set to IRISSliceWindow[0]. When polygon is set at the
other two windows, segmentation doesn't work. The situation is same as
before. I don't know why idxImage[2] is set to m_DisplayAxisPosition in
IRISSliceWindow::AcceptPolygon(). I thought it should be modified.
But the label display has no problem.

Best regards,

Chunyan


On 1/15/06, Paul Yushkevich <pauly2 at grasp.upenn.edu> wrote:
>
> Chenyun,
>
> I am not sure, but maybe the problem is that the polygon is only one
> pixel thick and the level set algorithm does not let it expand. Try
> initializing with two or three-slice thick polygons.
>
> Also, please post your snap questions at www.itksnap.org/bb
>
> Paul.
> --
> Paul A. Yushkevich, Ph.D.
> Research Fellow
> Penn Image Computing and Science Laboratory (PICSL)
> Department of Radiology,
> University of Pennsylvania
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20060116/abea6e4c/attachment.html


More information about the Insight-developers mailing list