[ITK] Question about applying registration transformation to another data set
Ivan Hidrovo
ivan.hidrovo at gmail.com
Mon Jun 12 17:45:28 EDT 2017
Hello community,
I know that this is not an itk related question, but does anybody know how
to input my own created 0-1 bit mask for general registration (BRAINS) in
3D slicer?
Thank you,
Ivan
On Mon, Jun 12, 2017 at 2:31 PM, Andras Lasso <lasso at queensu.ca> wrote:
> You must follow my example exactly. Lines are not allowed to be removed or
> reordered.
>
>
>
> Andras
>
>
>
> *From: *Ivan Hidrovo <ivan.hidrovo at gmail.com>
> *Sent: *Monday, June 12, 2017 3:28 PM
> *To: *Andras Lasso <lasso at queensu.ca>
>
> *Subject: *Re: [ITK] Question about applying registration transformation
> to another data set
>
>
> Dear Andras,
>
> We tried this :
>
> type: int
> dimension: 3
> sizes: 91 106 115
> endian: little
> encoding: raw
> data file: m1d0_ROIRegboxS.raw
>
> It loaded nothing (at least not visible in the windows open)
>
> but when we tried a mhd format it appears to show it:
>
>
>
>
>
>
> *ObjectType = Image NDims = 3 DimSize = 91 106 115 ElementType = MET_INT
> ElementDataFile = m1d0_ROIRegboxS.raw *
> What are we doing wrong in the nrrd format.
>
> Can we go ahead with mhd ?
>
> On Mon, Jun 12, 2017 at 12:29 PM, Ivan Hidrovo <ivan.hidrovo at gmail.com>
> wrote:
>
>> Dear Andras,
>>
>> Thank you.
>>
>> -Ivan
>>
>> On Mon, Jun 12, 2017 at 12:19 PM, Andras Lasso <lasso at queensu.ca> wrote:
>>
>>> 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/nr
>>> rd/format.html#basic
>>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fteem.sourceforge.net%2Fnrrd%2Fformat.html%23basic&data=02%7C01%7Classo%40queensu.ca%7Cf9bded9ae6454207bc0008d4b1c928e2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636328924909734583&sdata=2WkBPYI0I%2FtaXtqiMxzdBPPtB8W7FoDXM%2B6JfMXBU3w%3D&reserved=0>),
>>> *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/MatlabBr
>>> idge/src/MatlabCommander/commandserver/
>>> <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsubversion.assembla.com%2Fsvn%2Fslicerrt%2Ftrunk%2FMatlabBridge%2Fsrc%2FMatlabCommander%2Fcommandserver%2F&data=02%7C01%7Classo%40queensu.ca%7Cf9bded9ae6454207bc0008d4b1c928e2%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636328924909734583&sdata=WWT2Wu4ATC51JBOE7TFoFSx7O9u5USw0qVAYZ6YC1H0%3D&reserved=0>
>>> ).
>>>
>>>
>>>
>>> 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>
>>> 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/e3f8c762/attachment.html>
More information about the Community
mailing list