[Insight-users] Wrapping MultiResImageRegistration1.cxx to JAVA

Oliveira Marcelo marceloitk at yahoo.com.br
Tue Dec 14 06:58:36 EST 2004


Hi users !!!

Im trying to write the MultiResImageRegistration1.cxx
to JAVA, but im doubts in a lot of things. I tryed to
find any examples in Insight and search on Google
insight-users but i couldn´t find any examples.

Taxs for your help 


1 - 

I think that my Monitor Registration is completly
wrong.

public class RegistrationInterfaceCommand extends
itkCommand{
       
   protected RegistrationInterfaceCommand() {}
  
   public void Execute(itkObject object,final
InsightToolkit.itkEventObject event)
   {
     
       itkIterationEvent it = new itkIterationEvent();


          if( (event) ==  (it)  )
          {
              return;
          }
          
        
itkRegularStepGradientDescentOptimizer_Pointer
optimizer =
itkRegularStepGradientDescentOptimizer_New();

          optimizer.SetMaximumStepLength( 16.00 );  
          optimizer.SetMinimumStepLength( 2.5 );

          optimizer.GetCurrentIteration();
          optimizer.GetValue();
          optimizer.GetCurrentPosition();
      
   }
    
}

2- How can i add an Observer. Ho can i use
itkExceptionObject in JAVA ??


RegistrationInterfaceCommand observer = new
RegistrationInterfaceCommand();
     
     itkIterationEvent event = new
itkIterationEvent();
    
     optimizer.AddObserver( event, observer );
   
     
        try
        {
            registration.StartRegistration();
        }
        catch( itkExceptionObject ioe  )
        {
          System.err.println("ExceptionObject caught
!");
          ioe.printStackTrace();                  

        }





__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/ 


More information about the Insight-users mailing list