[Insight-developers] [Insight-users] Using image metric with identity transform.

M.Staring at lumc.nl M.Staring at lumc.nl
Mon Jul 7 03:05:00 EDT 2008


Hi Luis,

The Set-functions could be implemented similar to SetParameters(), so
empty:

virtual void SetParameters(const ParametersType &) {};
virtual void SetFixedParameters(const ParametersType &) {};

The Get-functions could indeed return zero-size arrays. Since the
identity transform has no parameters, this is what a user (should)
expect(s). Suggested implementation:

virtual const ParametersType& GetParameters(void) const
{
  return this->m_Parameters;
}

virtual const ParametersType& GetFixedParameters(void) const
{
  return this->m_FixedParameters;
}

The GetJacobian as it is.

And in the constructor:

this->m_Parameters = ParametersType( 0 );
this->m_FixedParameters = ParametersType( 0 );
this->m_Jacobian = JacobianType(0,0);

Note that the Jacobian should probably be changed from size
(NDimensions,1) filled with zeros, to a size (0,0).

With kind regards,

Marius


> 
> 
> Hi Marius,
> 
> Since the IdentityTransform doesn't have any fixed nor 
> varying parameters, we just didn't figure out what could be a 
> sensible implementation of the methods
> 
> 
>        SetFixedParameters()
>        GetFixedParameters()
>        GetJacobian()
>        SetParameters()
>        GetParameters()
> 
> 
> Presumably we could have them all manage arrays of zero size...
> 
> 
> Any suggestions for a reasonable implementation of these methods
> are welcome,
> 
> 
>      Thanks
> 
> 
>         Luis
> 
> 
> ----------------------------
> M.Staring at lumc.nl wrote:
> > Hi Brano,
> > 
> > that sounds reasonable to me. Also the GetJacobian is 
> overridden in the
> > IdentityTransform.
> > 
> > In this case we should also override the implementations of
> > 
> > SetFixedParameters
> > GetFixedParameters 
> > 
> > and GetParameters as you suggested.
> > 
> > ITK developers, was there any reason not to override these 
> functions for
> > the IdentityTransform?
> > 
> > Marius
> > 
> > 
> >>-----Original Message-----
> >>From: insight-users-bounces at itk.org 
> >>[mailto:insight-users-bounces at itk.org] On Behalf Of Branislav Goga
> >>Sent: Friday, July 04, 2008 12:10 PM
> >>To: insight-users at itk.org
> >>Subject: Re: [Insight-users] Using image metric with identity 
> >>transform.
> >>
> >>
> >>Thank you for reply, I can see the point, this is exactly the 
> >>way how I do it right now. But I think this is not clear 
> >>design! Imagine you will proceed transforms of different type 
> >>at this point of your application, now you have to check the 
> >>type and switch. I think each class derived from 
> >>itk::Transform<> should fullfill this interface. Identity 
> >>transform can return itk::Array<> with 0 parameters, and 
> >>everything will be ok. Can anybody find better solution that 
> >>presented, please write it down. I`m very inquiring. 
> >>--
> >>View this message in context: 
> >>http://www.nabble.com/Using-image-metric-with-identity-transfo
> >>rm.-tp18275192p18276625.html
> >>Sent from the ITK - Users mailing list archive at Nabble.com.
> >>
> >>_______________________________________________
> >>Insight-users mailing list
> >>Insight-users at itk.org
> >>http://www.itk.org/mailman/listinfo/insight-users
> >>
> >>No virus found in this incoming message.
> >>Checked by AVG. 
> >>Version: 8.0.134 / Virus Database: 270.4.5/1533 - Release 
> >>Date: 7/3/2008 7:19 PM
> >>
> > 
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> > 
> 
> No virus found in this incoming message.
> Checked by AVG. 
> Version: 8.0.136 / Virus Database: 270.4.5/1537 - Release 
> Date: 7/6/2008 5:26 AM
> 


More information about the Insight-developers mailing list