[Insight-users] itk::PCAShapeSignedDistanceFunction

Lucas Lorenzo lucas at cvrti.utah.edu
Tue, 27 Apr 2004 19:12:21 -0600


--Apple-Mail-6--419157196
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=WINDOWS-1252;
	format=flowed

Hi Lydia,

to set the seed points I'm using the=20
FloodFilledSpatialFunctionConditionalIterator member function=20
FindSeedPixels().
I have a doubt: let's say that I run one first iteration and I get the=20=

seed points this way. Then, during a second iteration the spatial=20
function changes in value but not in dimension and size. If I use=20
FindSeedPixels() again will I get the same seed points ?
Thanks,

Lucas


On Apr 2, 2004, at 4:47 PM, Lydia Ng wrote:

> Ok, I think I have a solution.
>
> =A0
>
> The FloodFilledSpatialFunctionConditionalIterator might be the answer.
>
> Basically, this iterator starts at a user specify seed point(s) and=20
> only explore the pixels for which a SpatialFunction returns a non-zero=20=

> value.
>
> =A0
>
> Note that this will only visits the pixels which are connected (via=20
> the SpatialFunction membership criteria) to the seed point. So if the=20=

> region you desired is composed of several separate regions, you will=20=

> need at lease one seed point per region.
>
> =A0
>
> To use this iterator the way you want, you would need to wrap the=20
> PCAShapeSignedDistanceFunction into another SpatialFunction that=20
> returns true if the distance is within [low_val, high_val] and false=20=

> otherwise.
>
> =A0
>
> I have just created such a class BinaryThresholdSpatialFunction and=20
> checked it into cvs.
>
> =A0
>
> The test itkBinaryThresholdSpatialFunction illustrates how to connect=20=

> up a ShapeSignedDistanceFunction (the test uses the simpler sphere=20
> function =96 but the mechanism is the same) and how it can be used in=20=

> conjunction with the FloodFilledSpatialFunctionConditionalIterator.
>
> =A0
>
> Check it out.
>
> =A0
>
> -Lydia
>
> =A0
>
> =A0
>
> -----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
>
> =A0
>
> Thanks Lydia,
>
>  =A0
>
> what I'm doing right now is using an ImageConstIteratorWithIndex to=20
> iterate over a FeatureImageType image and at each iteration step I'm=20=

> getting the index (GetIndex()) so as to evaluate the=20
> PCAShapeSignedDistanceFunction. Then, if the signe distance function=20=

> value is within the window I've already defined, I perform other=20
> operations using the FeatureImage values.
>
>  =A0
>
> So, the previous process works but very slowly.
>
>  =A0
>
> Is there a way to iterate directly over the=20
> PCAShapeSignedDistanceFunction, getting the index ONLY when the signed=20=

> distance value is within the window (calling this way method=20
> GetIndex() a few times) ? This way I assume the process would be much=20=

> faster.
>
>  =A0
>
> Thanks,
>
>  =A0
>
> Lucas
>
>  =A0
>
> On Apr 1, 2004, at 11:54 AM, Lydia Ng wrote:
>
>  =A0
>
> Lucas,
>
>  =A0
>
> I don't believe there is apart from polling one pixel at a time.
>
>  =A0
>
> Even if you use a combination of filters
>
>  SpatialFunctionImageEvaluatorFilter->BinaryThresholdImageFilter you=20=

> will
>
>  still need to eventually visit every pixel to find which is within=20
> range.
>
>  =A0
>
> - Lydia
>
>  =A0
>
> -----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
>
>  =A0
>
> Hi all,
>
>  =A0
>
> 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,
>
>  =A0
>
> Lucas
>
>  =A0
>
> Lucas Lorenzo
>
>  =A0
>
> University of Utah
>
>  Nora Eccles Harrison CardioVascular Research and Training Institute
>
>  Fellows Room
>
>  95 South 2000 East
>
>  Salt Lake City, UT 84112-5000
>
>  =A0
>
> e-mail: lucas at cvrti.utah.edu
>
>  telephone: 801-587-9536
>
>  =A0
>
> _______________________________________________
>
>  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
>
>  =A0
>
> Lucas Lorenzo
>
>  =A0
>
> University of Utah
>
>  Nora Eccles Harrison CardioVascular Research and Training Institute
>
>  Fellows Room
>
>  95 South 2000 East
>
>  Salt Lake City, UT 84112-5000
>
>  =A0
>
> 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

--Apple-Mail-6--419157196
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=WINDOWS-1252

Hi Lydia,


<color><param>0000,0000,0000</param>to set the seed points I'm using
the FloodFilledSpatialFunctionConditionalIterator member function
FindSeedPixels().

I have a doubt: let's say that I run one first iteration and I get the
seed points this way. Then, during a second iteration the spatial
function changes in value but not in dimension and size. If I use
FindSeedPixels() again will I get the same seed points ?

Thanks,


=
Lucas</color><bold><fontfamily><param>Times</param><color><param>0000,0000=
,EEED</param><bigger><bigger>


</bigger></bigger></color></fontfamily></bold>

On Apr 2, 2004, at 4:47 PM, Lydia Ng wrote:


=
<excerpt><fontfamily><param>Arial</param><color><param>0000,0000,8080</par=
am><x-tad-bigger>Ok,
I think I have a solution.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>The
FloodFilledSpatialFunctionConditionalIterator might be the =
answer.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>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.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>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.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>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.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>I
have just created such a class BinaryThresholdSpatialFunction and
checked it into cvs.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>The
test itkBinaryThresholdSpatialFunction illustrates how to connect up a
ShapeSignedDistanceFunction (the test uses the simpler sphere function
=96 but the mechanism is the same) and how it can be used in conjunction
with the =
FloodFilledSpatialFunctionConditionalIterator.</x-tad-bigger></color></fon=
tfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>Check
it out.</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>-Lydia</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


=
<fontfamily><param>Arial</param><color><param>0000,0000,8080</param><x-tad=
-bigger>=A0</x-tad-bigger></color></fontfamily>


<fontfamily><param>Tahoma</param><x-tad-bigger>-----Original
Message-----</x-tad-bigger></fontfamily>

=
<bold><fontfamily><param>Tahoma</param><x-tad-bigger>From:</x-tad-bigger><=
/fontfamily></bold><fontfamily><param>Tahoma</param><x-tad-bigger>
Lucas Lorenzo [mailto:lucas at cvrti.utah.edu]</x-tad-bigger></fontfamily>

<fontfamily><param>Tahoma</param><x-tad-bigger>
=
</x-tad-bigger><bold><x-tad-bigger>Sent:</x-tad-bigger></bold><x-tad-bigge=
r>
Thursday, April 01, 2004 11:09 AM</x-tad-bigger></fontfamily>

=
<bold><fontfamily><param>Tahoma</param><x-tad-bigger>To:</x-tad-bigger></f=
ontfamily></bold><fontfamily><param>Tahoma</param><x-tad-bigger>
Lydia Ng</x-tad-bigger></fontfamily>

=
<bold><fontfamily><param>Tahoma</param><x-tad-bigger>Cc:</x-tad-bigger></f=
ontfamily></bold><fontfamily><param>Tahoma</param><x-tad-bigger>
ITK</x-tad-bigger></fontfamily>

=
<bold><fontfamily><param>Tahoma</param><x-tad-bigger>Subject:</x-tad-bigge=
r></fontfamily></bold><fontfamily><param>Tahoma</param><x-tad-bigger>
Re: [Insight-users] =
itk::PCAShapeSignedDistanceFunction</x-tad-bigger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>Thanks =
Lydia,</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>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.</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>So, the
previous process works but very slowly.</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>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.</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>Thanks,</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>Lucas</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>On Apr 1,
2004, at 11:54 AM, Lydia Ng wrote:</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>Lucas,</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>I don't
believe there is apart from polling one pixel at a =
time.</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>Even if you
use a combination of filters</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
SpatialFunctionImageEvaluatorFilter->BinaryThresholdImageFilter you
will</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> still need
to eventually visit every pixel to find which is within =
range.</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>- =
Lydia</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>-----Original
Message-----</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> From: Lucas
Lorenzo [mailto:lucas at cvrti.utah.edu]</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Sent:
Thursday, April 01, 2004 9:53 AM</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> To: =
ITK</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Subject:
[Insight-users] =
itk::PCAShapeSignedDistanceFunction</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>Hi =
all,</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>sorry for
insisting but I do not give up yet.</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Does anyone
know of a fast, efficient way to get the indexes of =
those</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> pixels
falling within a particular window (lets call them low_val =
and</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> high_val)
from a PCAShapeSignedDistanceFunction ?</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
Thanks,</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>Lucas</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>Lucas =
Lorenzo</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>University
of Utah</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Nora Eccles
Harrison CardioVascular Research and Training =
Institute</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Fellows =
Room</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> 95 South
2000 East</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Salt Lake
City, UT 84112-5000</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>e-mail:
lucas at cvrti.utah.edu</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> telephone:
801-587-9536</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New =
Roman</param><bigger><bigger>_____________________________________________=
__</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
Insight-users mailing list</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
Insight-users at itk.org</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
=
http://www.itk.org/mailman/listinfo/insight-users</bigger></bigger></fontf=
amily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
=
_______________________________________________</bigger></bigger></fontfam=
ily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
Insight-users mailing list</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
Insight-users at itk.org</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>
=
http://www.itk.org/mailman/listinfo/insight-users</bigger></bigger></fontf=
amily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>Lucas =
Lorenzo</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>University
of Utah</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Nora Eccles
Harrison CardioVascular Research and Training =
Institute</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Fellows =
Room</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> 95 South
2000 East</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> Salt Lake
City, UT 84112-5000</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> =
=A0</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger>e-mail:
lucas at cvrti.utah.edu</bigger></bigger></fontfamily>


<fontfamily><param>Times New Roman</param><bigger><bigger> telephone:
801-587-9536</bigger></bigger></fontfamily>


</excerpt>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


--Apple-Mail-6--419157196--