[ITK] Question about applying registration transformation to another data set
Andras Lasso
lasso at queensu.ca
Mon Jun 12 13:19:19 EDT 2017
Yes, you can load raw files into 3D Slicer. You just have to create a small text file that specifies how your raw file should be interpreted (pixel type, image size, spacing). For example, if you have a raw file ‘myimage.raw’ create a text file called ‘myimage.nhdr’ in the same directory with the following content:
NRRD0004
type: short
dimension: 3
space: left-posterior-superior
sizes: 256 256 130
space directions: (1.0,0,0) (0,1.0,0) (0,0,1.0)
kinds: domain domain domain
endian: little
encoding: raw
space origin: (0.0,0.0,0.0)
data file: myimage.raw
Probably you only need to change type (probably uchar, short, or double – see all options here: http://teem.sourceforge.net/nrrd/format.html#basic), sizes (image size in pixels), and space directions (change 1.0 values to image spacing values).
If you create your images in Matlab then you can use nrrdwrite.m to write your matrix into a raw file along with a .nhdr text header file (https://subversion.assembla.com/svn/slicerrt/trunk/MatlabBridge/src/MatlabCommander/commandserver/).
You can load the image by drag-and-dropping the .nrrd file into 3DSlicer application window.
Andras
From: Community [mailto:community-bounces at itk.org] On Behalf Of Ivan Hidrovo
Sent: Monday, June 12, 2017 1:05 PM
To: community at itk.org
Subject: Re: [ITK] Question about applying registration transformation to another data set
Hello community,
Can you kindly tell me
1) if you can input a threshold to an image on ITK when implementing an algorithm?
For example when running registration I wish to use only voxel values within a lower and higher threshold
2) Also,do you know if you can use raw files in Slicer3D? we had difficulty putting raw data into slicer and hence switched to ITK
Thank you,
Ivan
On Fri, Jun 9, 2017 at 12:08 PM, Ivan Hidrovo <ivan.hidrovo at gmail.com<mailto:ivan.hidrovo at gmail.com>> wrote:
Hello all,
We are registering 2 data sets A and B using ImageRegistration8.cxx. We get an output dataset C registered to A and also some matrix numbers which we believe to be the rigid registration parameters.
We need to apply the same registration transformation to another data set (of a different modality) -- is there a way to use this code or another code to apply a given transformation to an image.
Or do we need to make small changes to the code to do this.
thanks,
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170612/c063512c/attachment.html>
More information about the Community
mailing list