[Insight-users] itk::PCAShapeSignedDistanceFunction

lucas lucas at mail.cvrti.utah.edu
Wed, 14 Apr 2004 15:58:50 -0600


Hi Luis and Lydia,

thank you boh. I've already downloaded the CVS version and 
I could compile my program.

Lucas

On Wed, 14 Apr 2004 16:43:11 -0400
  Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>Hi Lucas,
>
>It is unlikely that a class taken from the CVS
>version of ITK will work correctly when grafted
>into version 1.6.
>
>Please use a CVS checkout in order to have a
>consistent set of source files.
>
>You may want to keep both a 1.6 version and
>a CVS version of ITK in your machine, if disk
>space is not a concern...
>
>
>Regards,
>
>
>    Luis
>
>
>-------------------
>Lucas Lorenzo wrote:
>
>> Hi Lydia,
>> 
>> sorry for my delayed answer but thanks a lot for your 
>>help.
>> 
>> I'm having some problems when compiling 
>>itkBinaryThresholdSpatialFunction
>> I'm compiling it against the released 1.6 ITK version. 
>>Should I use the 
>> CVS version exclusively ?
>> The errors I'm getting are listed bellow.
>> Thanks,
>> 
>> Lucas
>> 
>> 
>> /lucas:TEST> make
>> Building object file 
>>BinaryThresholdSpatialFunctionTest.o...
>> /usr/local/include/InsightToolkit/Common/itkImageBase.h: 
>>In 
>> instantiation of 
>> `itk::GetImageDimension<itkBinaryThresholdSpatialFunctionTest(int, 
>> char**)::SphereFunctionType>':
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> instantiated from 
>> `itk::BinaryThresholdSpatialFunction<itkBinaryThresholdSpatialFunctionTest(int, 
>> char**)::SphereFunctionType>'
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> instantiated from here
>> /usr/local/include/InsightToolkit/Common/itkImageBase.h:42: 
>>error: `
>> ImageDimension' is not a member of type `
>> itkBinaryThresholdSpatialFunctionTest(int, 
>>char**)::SphereFunctionType'
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx: 
>> In instantiation of 
>> `itk::BinaryThresholdSpatialFunction<itkBinaryThresholdSpatialFunctionTest(int, 
>> char**)::SphereFunctionType>':
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> instantiated from here
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> error: non-constant
>> `itk::GetImageDimension<itkBinaryThresholdSpatialFunctionTest(int,
>> char**)::SphereFunctionType>::ImageDimension' cannot be 
>>used as template
>> argument
>> /private/var/automount/mom/u/lucas/Borrar/TEST/itkBinaryThresholdSpatialFunction.h: 
>> In instantiation of 
>> `itk::BinaryThresholdSpatialFunction<itkBinaryThresholdSpatialFunctionTest(int, 
>> char**)::SphereFunctionType>':
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> instantiated from here
>> /private/var/automount/mom/u/lucas/Borrar/TEST/itkBinaryThresholdSpatialFunction.h:51: 
>> error: non-constant
>> `itk::GetImageDimension<itkBinaryThresholdSpatialFunctionTest(int,
>> char**)::SphereFunctionType>::ImageDimension' cannot be 
>>used as template
>> argument
>> /private/var/automount/mom/u/lucas/Borrar/TEST/itkBinaryThresholdSpatialFunction.h: 
>> In instantiation of 
>> `itk::BinaryThresholdSpatialFunction<itkBinaryThresholdSpatialFunctionTest(int, 
>> char**)::SphereFunctionType>':
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> instantiated from here
>> /private/var/automount/mom/u/lucas/Borrar/TEST/itkBinaryThresholdSpatialFunction.h:62: 
>> error: non-constant
>> `itk::GetImageDimension<itkBinaryThresholdSpatialFunctionTest(int,
>> char**)::SphereFunctionType>::ImageDimension' cannot be 
>>used as template
>> argument
>> /private/var/automount/mom/u/lucas/Borrar/TEST/itkBinaryThresholdSpatialFunction.txx: 
>> In instantiation of 
>> `itk::BinaryThresholdSpatialFunction<itkBinaryThresholdSpatialFunctionTest(int, 
>> char**)::SphereFunctionType>':
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:65: 
>> instantiated from here
>> /private/var/automount/mom/u/lucas/Borrar/TEST/itkBinaryThresholdSpatialFunction.txx:59: 
>> error: non-constant
>> `itk::GetImageDimension<itkBinaryThresholdSpatialFunctionTest(int,
>> char**)::SphereFunctionType>::ImageDimension' cannot be 
>>used as template
>> argument
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx: 
>> In
>> function `int itkBinaryThresholdSpatialFunctionTest(int, 
>>char**)':
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:84: 
>> error: `
>> OutputType' is not a member of type `
>> 
>> itk::BinaryThresholdSpatialFunction<itkBinaryThresholdSpatialFunctionTest(int, 
>> 
>> char**)::SphereFunctionType>'
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:84: 
>> error: parse
>> error before `=' token
>> /private/var/automount/mom/u/lucas/Borrar/TEST/BinaryThresholdSpatialFunctionTest.cxx:85: 
>> error: `
>> /
>> Errors continue ...
>> 
>> On Apr 2, 2004, at 4:47 PM, Lydia Ng wrote:
>> 
>>     Ok, I think I have a solution.
>> 
>>      
>> 
>>     The FloodFilledSpatialFunctionConditionalIterator 
>>might be the answer.
>> 
>>     Basically, this iterator starts at a user specify 
>>seed point(s) and
>>     only explore the pixels for which a SpatialFunction 
>>returns a
>>     non-zero value.
>> 
>>      
>> 
>>     Note that this will only visits the pixels which are 
>>connected (via
>>     the SpatialFunction membership criteria) to the seed 
>>point. So if
>>     the region you desired is composed of several 
>>separate regions, you
>>     will need at lease one seed point per region.
>> 
>>      
>> 
>>     To use this iterator the way you want, you would 
>>need to wrap the
>>     PCAShapeSignedDistanceFunction into another 
>>SpatialFunction that
>>     returns true if the distance is within [low_val, 
>>high_val] and false
>>     otherwise.
>> 
>>      
>> 
>>     I have just created such a class 
>>BinaryThresholdSpatialFunction and
>>     checked it into cvs.
>> 
>>      
>> 
>>     The test itkBinaryThresholdSpatialFunction 
>>illustrates how to
>>     connect up a ShapeSignedDistanceFunction (the test 
>>uses the simpler
>>     sphere function – but the mechanism is the same) and 
>>how it can be
>>     used in conjunction with the
>>     FloodFilledSpatialFunctionConditionalIterator.
>> 
>>      
>> 
>>     Check it out.
>> 
>>      
>> 
>>     -Lydia
>> 
>>      
>> 
>>      
>> 
>>     -----Original Message-----
>>     *From:* Lucas Lorenzo [mailto:lucas at cvrti.utah.edu]
>>     *Sent:* Thursday, April 01, 2004 11:09 AM
>>     *To:* Lydia Ng
>>     *Cc:* ITK
>>     *Subject:* Re: [Insight-users] 
>>itk::PCAShapeSignedDistanceFunction
>> 
>>      
>> 
>>     Thanks Lydia,
>> 
>>      
>> 
>>     what I'm doing right now is using an 
>>ImageConstIteratorWithIndex to
>>     iterate over a FeatureImageType image and at each 
>>iteration step I'm
>>     getting the index (GetIndex()) so as to evaluate the
>>     PCAShapeSignedDistanceFunction. Then, if the signe 
>>distance function
>>     value is within the window I've already defined, I 
>>perform other
>>     operations using the FeatureImage values.
>> 
>>      
>> 
>>     So, the previous process works but very slowly.
>> 
>>      
>> 
>>     Is there a way to iterate directly over the
>>     PCAShapeSignedDistanceFunction, getting the index 
>>ONLY when the
>>     signed distance value is within the window (calling 
>>this way method
>>     GetIndex() a few times) ? This way I assume the 
>>process would be
>>     much faster.
>> 
>>      
>> 
>>     Thanks,
>> 
>>      
>> 
>>     Lucas
>> 
>>      
>> 
>>     On Apr 1, 2004, at 11:54 AM, Lydia Ng wrote:
>> 
>>      
>> 
>>     Lucas,
>> 
>>      
>> 
>>     I don't believe there is apart from polling one 
>>pixel at a time.
>> 
>>      
>> 
>>     Even if you use a combination of filters
>> 
>>     SpatialFunctionImageEvaluatorFilter->BinaryThresholdImageFilter 
>>you
>>     will
>> 
>>     still need to eventually visit every pixel to find 
>>which is within
>>     range.
>> 
>>      
>> 
>>     - Lydia
>> 
>>      
>> 
>>     -----Original Message-----
>> 
>>     From: Lucas Lorenzo [mailto:lucas at cvrti.utah.edu]
>> 
>>     Sent: Thursday, April 01, 2004 9:53 AM
>> 
>>     To: ITK
>> 
>>     Subject: [Insight-users] 
>>itk::PCAShapeSignedDistanceFunction
>> 
>>      
>> 
>>     Hi all,
>> 
>>      
>> 
>>     sorry for insisting but I do not give up yet.
>> 
>>     Does anyone know of a fast, efficient way to get the 
>>indexes of those
>> 
>>     pixels falling within a particular window (lets call 
>>them low_val and
>> 
>>     high_val) from a PCAShapeSignedDistanceFunction ?
>> 
>>     Thanks,
>> 
>>      
>> 
>>     Lucas
>> 
>>      
>> 
>>     Lucas Lorenzo
>> 
>>      
>> 
>>     University of Utah
>> 
>>     Nora Eccles Harrison CardioVascular Research and 
>>Training Institute
>> 
>>     Fellows Room
>> 
>>     95 South 2000 East
>> 
>>     Salt Lake City, UT 84112-5000
>> 
>>      
>> 
>>     e-mail: lucas at cvrti.utah.edu
>> 
>>     telephone: 801-587-9536
>> 
>>      
>> 
>>     _______________________________________________
>> 
>>     Insight-users mailing list
>> 
>>     Insight-users at itk.org
>> 
>>     http://www.itk.org/mailman/listinfo/insight-users
>> 
>>     _______________________________________________
>> 
>>     Insight-users mailing list
>> 
>>     Insight-users at itk.org
>> 
>>     http://www.itk.org/mailman/listinfo/insight-users
>> 
>>      
>> 
>>     Lucas Lorenzo
>> 
>>      
>> 
>>     University of Utah
>> 
>>     Nora Eccles Harrison CardioVascular Research and 
>>Training Institute
>> 
>>     Fellows Room
>> 
>>     95 South 2000 East
>> 
>>     Salt Lake City, UT 84112-5000
>> 
>>      
>> 
>>     e-mail: lucas at cvrti.utah.edu
>> 
>>     telephone: 801-587-9536
>> 
>> Lucas Lorenzo
>> 
>> University of Utah
>> Nora Eccles Harrison CardioVascular Research and 
>>Training Institute
>> Fellows Room
>> 95 South 2000 East
>> Salt Lake City, UT 84112-5000
>> 
>> e-mail: lucas at cvrti.utah.edu
>> telephone: 801-587-9536
>> 
>
>
>