No subject


Sun Oct 26 02:42:03 EDT 2008


Code/Algorithms/itkBayesianClassifierImageFilter.txx-
this->GetOutput()->SetRegions( membershipImage->GetBufferedRegion() );
Code/Algorithms/itkBayesianClassifierImageFilter.txx:
this->GetOutput()->SetSpacing( membershipImage->GetSpacing() );
Code/Algorithms/itkBayesianClassifierImageFilter.txx-
this->GetOutput()->SetOrigin(  membershipImage->GetOrigin() );
Code/Algorithms/itkBayesianClassifierImageFilter.txx-
this->GetOutput()->Allocate();

NOTICE:  The output of this filter does not set the Direction!!!!
this->GetOutput()->SetDirection(  membershipImage->GetDirection() );
=======================================================

Unfortunately this seems like a very common problem throughout ITK.   It is
my assumption that most filters that: a) take input image, b) do something
to the intensity values, c) generate and output image; will behave in such a
way that the output image has the same origin, spacing, size, AND direction
as the input image.  Filters  that: a)take an input image, b) take
parameters for desired output physical space defintion, c) generate the new
output image; must have options for setting Spacing, Origin, AND Direction.

Experimental build:
http://www.cdash.org/CDash/buildSummary.php?buildid=210257

I hope to have the code committed and bugs reported in about 1 hour.

Hans
-- 
Hans J. Johnson, Ph.D.
Hans-johnson at uiowa.edu

278 GH
The University of Iowa
Iowa City, IA 52241
(319) 353 8587




Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.

--B_3308897251_15529898
Content-type: text/html;
	charset="US-ASCII"
Content-transfer-encoding: quoted-printable

<HTML>
<HEAD>
<TITLE>Bugs with respect to ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE </TITLE>
</HEAD>
<BODY><P><FONT face=3D"Lucida Console">
<FONT FACE=3D"Calibri, Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-siz=
e:11pt'>Luis,<BR>
<BR>
I'm sorry to spring this on you just hours after the release, but I disco=
vered several bugs when ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE is turned on, a=
nd images with different directions are used.<BR>
<BR>
I'm working on a patch right now, but it does touch many many files. &nbs=
p;So far my tests have shown that regression tests pass both with or withou=
t setting the output directions. &nbsp;The problem showed up when attemptin=
g to register images that have different orientations, spacing's, size, and=
 origins. &nbsp;I think that our test data is too uniformly defined to catc=
h these problems. <BR>
<BR>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D<BR>
grep -A 2 -B 2 &quot;Set.*Spacing.*Get.*Spacing&quot; Insight/Code/*/* &g=
t; ReviewList <BR>
<BR>


More information about the Insight-developers mailing list