[Insight-users] help in seedpoint

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 9 09:22:54 EDT 2009


Hi Arun,

I don't see in your code any initialization for the


    * Origin
    * Spacing
    * Direction

of the image,
before you call TransfromPhysicalPointToIndex().

Which is suspicious since then you are operating with
the defaults of Origin equal zeros, Spacing equal Ones,
Direction equal Identity matrix.


--

This however, shouldn't result in a crash.


Please do the following:


   Add:


     1) std::cout << seedIndex << std::endl;
     2) itkImage->Print(std::cout);


   And

     Compile the code for Debug,
     Run it into your favorite debugger
     and post to the list the lines of
     code where the program actually
     crashes.



   Thanks


      Luis


--------------------------
Arun Vishwanathan wrote:
> Hi Luis,
> Can you tell me please a possible reason as to why my code aborts when i
> click on "start reg growing" button of my gui?//my gui is fine it has no
> problem///
> what is below is my template for region growing..it works fine if the
> seedpoints are manually given but aborts if the user clicks on it
> //this is the part where i try to get the seedpoint index for getting
> the pixel value//
> typename itk::Point<double, VImageDimension> point;
> typename InputImageType::Pointer image=InputImageType::New();
> itkImage->TransformPhysicalPointToIndex(point,seedIndex);
> 
> 
> If my seedpoints were given manually as seedIndex[0]=50 seedIndex[1]=50
> for eg the code does not abort when the clicking is done on "start reg
> growing" of my gui
> 
> thanks
> Awaiting your reply
> Aaron
> 


More information about the Insight-users mailing list