[Insight-developers] Coordinate system semantics of ImageIOBase?
Steve M. Robbins
steve at sumost.ca
Sun Jan 11 22:23:30 EST 2009
On Sun, Jan 11, 2009 at 09:30:47PM -0500, Rupert Brooks wrote:
> 2 - larger problem: popen popen is not standard on windows, but your
> CreateMincFile.h uses it.
> Ultimately this is a sidetrack issue, as its just being used for the
> testing. However, it blocked
> me from compiling your test suite for the moment.
Yes, I suspected this would be a problem. I probably should have
highlighted it. I can think of two ways around this issue. First, we
could generate a set of files like Andrew and you did; the trick is
that there will be a lot of them. The second idea is to use MINC
directly to create the files rather than using popen() to pipe the
data into "rawtominc" as I am doing. If I were to code it, I'd
probably go for the second option.
> 3 -boost issues - i had trouble getting FIND_PACKAGE(Boost to work
> properly.
Whoa! I ditched Boost after learning about Googletest, so there
should not be any FIND_PACKAGE(Boost) stuff. Are you speaking of the
attachment "testmincio-smr.tar.gz" from bug #6038
http://www.itk.org/Bug/view.php?id=6038 ?
> Just a couple questions:
>
> MINC and ITK use different ways of specifying the origin / offset of
> the coordinate system. I believe
> that MINC uses the xstart, ystart, zstart as the distance _along the
> x,y,z direction cosines_, while
> ITK places the origin _such that pixel 0,0,0 is at the origin_.
If that's true, then it is my misunderstanding.
Since ImageIOBase::GetOrigin() is not documented, I asked this list
about it:
ME:
> The method GetOrigin(int i) returns a double; I assume that
> GetOrigin(0), GetOrigin(1), GetOrigin(2) return the column,
> row, and slice, respectively, of the world-space origin.
> Is that correct?
>
Louis responded "Yes"; c.f.
http://www.itk.org/mailman/private/insight-developers/2008-December/011435.html
To me, that means that ITK's GetOrigin() is the same notion as MINC's
"starts". If these are not identical, then I need a better description
of what GetOrigin() returns.
> If the spacing is negative (legal in MINC) then the direction cosine
> gets flipped. Good so far, but Isn't it also necessary
> to either flip the image in memory, or shift the origin to the other
> end of the negative axis?
I worried a bit about that, but I'm not certain of the answer. I
hadn't gotten that far in the coding.
Thanks for inspecting the code,
-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090111/c8b27329/attachment.pgp>
More information about the Insight-developers
mailing list