Hi Craig,
thanks for explaining. I guess the best approach is to map my
dicom/nifti/etc. header parameters onto FITS parameters. Do you know of
a document explaining the individual parameters? So far I've found this:
https://archive.stsci.edu/fits/fits_standard/node40.html#SECTION00942000000000000000
Specifically, how do I set image orientation, rotation and off-center
position relative to my WCS in a FITS header hash?
Just an example, Imagine a stack of images who's orthogonal is tilted by
30 degrees off the y-axis and rotated 45 degrees in-plane.
Actual data has a time dimension, is complex and has 2 other dimensions,
but these are rather simple since rotations don't make sense there.
Ingo
On 10/31/2016 04:16 PM, Craig DeForest wrote:
> Hi, Ingo,
>
> PDL::Transform itself deals with coordinate transformations alone. So
> you are tasked with tracking the transformations between different
> frames. It provides a collection of parameterized transformation
> constructors and a basic syntax for composing and inverting those
> transformations objects. You can apply a transformation to vector
> data arranged as row vectors (e.g., if your data have four independent
> variables, they are expected to have a dim 0 of size 4), or map an
> image whose index variables are related to the values of the
> independent variables. That functionality doesn’t require tracking
> anything in particular beyond the coordinate transformation that you
> are using: all the parameters are encapsulated in the transformation
> object.
>
> But PDL::Transform *does* have the ability to interpret and use the
> World Coordinate System (WCS), which is a part of the Flexible Image
> Transport System (FITS) standard. FITS files include metadata stored
> as keyword/value pairs in ASCII, human-readable punch-card analogs in
> a fixed-length header record at the beginning of the image. FITS
> headers are close enough to Perl hashes that you can place one in the
> hash-ref header field of a PDL. (This is made easier by the
> Astro::FITS::Header module, which creates a tied hash that behaves
> exactly like a FITS header, but that isn’t strictly necessary).
>
> WCS uses certain keywords in the FITS header to represent parameters
> of a transformation relating pixel index to actual scientific
> parameters. PDL::Transform can interpret those keywords
> automagically, so you can deal with the underlying physical
> coordinates rather than the raw pixel indices. That part of the code
> is extremely well tested and mature for images, but less well tested
> for higher dimensionality (though it should work and has worked in
> some applications). The FITS header interpretation currently only
> deals with the linear portion of FITS headers: for about 5-6 years
> there has been a standard for a family of nonlinear transformations
> that can be specified (to deal with telescope distortions of various
> kinds) but these have not been implemented.
>
> Cheers,
> Craig
>
>
>> On Oct 31, 2016, at 3:35 AM, Ingo Schmid <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi,
>>
>> finally I havetoreally face the issue of using real-world coordinates
>> for my piddles. So far, I've ignored rotations, which I no longer can
>> do. I guess thereare already a couple of implementations of at least
>> some of the features I need, so before Ireinvent the wheelI wanted
>> toask if you could point me to some solution.
>>
>> Basically, I have data in cuboids in space with arbitrary rotation,
>> translation and pixel scaling. Now I would like toe.g. extract data
>> from the same spatial volume or add them together, etc. They may have
>> extra dimensions as well, some without equally spacing, some with
>> non-numeric coordinates.
>>
>> I guess PDL::Transform is good for that.
>>
>> How do you effectively store and attach/receive the information? I
>> guess as translation/rotation/scaling vectors in the header and some
>> methods to translate the slicing? How to translate this to an
>> arbitrary number of dimensions?
>>
>>
>> Ingo
>>
>> ------------------------------------------------------------------------------
>> The Command Line: Reinvented for Modern Developers
>> Did the resurgence of CLI tooling catch you by surprise?
>> Reconnect with the command line and become more productive.
>> Learn the new .NET and ASP.NET <http://asp.net> CLI. Get your free copy!
>> http://sdm.link/telerik_______________________________________________
>> pdl-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pdl-general
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general