[Insight-users] How to set sizes of images
Hila Hiler
hilahiler at gmail.com
Thu Mar 22 11:40:29 EDT 2012
Thank you Dzenan,
actually, I looked again at the image's details. It seems that the
alignment process might be more complex than I thought because not just the
dimension are different but also the spacing, origin etc.
The details are attached.
please help to figure this up ...
2012/3/22 Dženan Zukić <dzenanz at gmail.com>
> http://www.itk.org/Doxygen/html/classitk_1_1ResampleImageFilter.html
> use identity transform, and at least linear interpolation (better cubic or
> windowed sinc)
>
> On Thu, Mar 22, 2012 at 13:16, Hila Hiler <hilahiler at gmail.com> wrote:
>
>> Hi all,
>>
>> I have two itk images in 3D which are alined to each other bit have a
>> different size, and I'd like to set their dimensions to be equals.
>> the size of one of them is: dim1=[x y z ] and I'd like it to be as the
>> other one size which is: dim2=[x+a y+b z-c] while a,b,c>0
>>
>> so I'd like the image size to be changed from im1[dim1] => im1[dim2]
>>
>> How I should do that?
>>
>> Thanks in advance!
>>
>>
>> Best,
>> Hila
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120322/14a4c85c/attachment.htm>
-------------- next part --------------
Image 1
============
Image (14F1B178)
Dimension: 3
Dimensions: 185 404 159
Channel: Unnamed [scalar]
PixelType: short
BitsPerElement: 2
NumberOfComponents: 1
BitsPerComponent: 16
TimeSlicedGeometry: TimeSlicedGeometry (14F903F0)
EvenlyTimed: 1
TimeSteps: 1
GetGeometry3D(0): SlicedGeometry3D (14C64538)
IndexToWorldTransform:
Matrix:
0.488281 -0 -0
-0 0.488281 -0
0 0 1
Offset: [-93.76, -106.98, -46.2373]
Center: [0, 0, 0]
Translation: [-93.76, -106.98, -46.2373]
Inverse:
2.048 0 0
0 2.048 0
0 0 1
Scale : 1 1 1
BoundingBox: ( 0,185 0,404 0,159 )
Origin: [-93.76, -106.98, -46.2373]
ImageGeometry: 1
Spacing: [0.488281, 0.488281, 1]
TimeBounds: [-3.40282e+038, 3.40282e+038]
EvenlySpaced: 1
DirectionVector: [0, 0, 1]
Slices: 159
GetGeometry2D(0): PlaneGeometry (14F90188)
IndexToWorldTransform:
Matrix:
0.488281 0 0
0 0.488281 0
0 0 1
Offset: [-93.76, -106.98, -46.2373]
Center: [0, 0, 0]
Translation: [-93.76, -106.98, -46.2373]
Inverse:
2.048 0 0
0 2.048 0
0 0 1
Scale : 1 1 1
BoundingBox: ( 0,185 0,404 0,1 )
Origin: [-93.76, -106.98, -46.2373]
ImageGeometry: 1
Spacing: [0.488281, 0.488281, 1]
TimeBounds: [-3.40282e+038, 3.40282e+038]
ScaleFactorMMPerUnitX: 0.488281
ScaleFactorMMPerUnitY: 0.488281
Normal: [0, 0, 1]
image 2
============
Image (14CB59E0)
Dimension: 3
Dimensions: 158 158 486
Channel: Unnamed [scalar]
PixelType: float
BitsPerElement: 4
NumberOfComponents: 1
BitsPerComponent: 32
TimeSlicedGeometry: TimeSlicedGeometry (14C9ADC0)
EvenlyTimed: 1
TimeSteps: 1
GetGeometry3D(0): SlicedGeometry3D (14DF1B18)
IndexToWorldTransform:
Matrix:
0.5 0 0
0 0.5 0
0 0 0.5
Offset: [-64.9922, -33.7281, -132.515]
Center: [0, 0, 0]
Translation: [-64.9922, -33.7281, -132.515]
Inverse:
2 0 0
0 2 0
0 0 2
Scale : 1 1 1
BoundingBox: ( 0,158 0,158 0,486 )
Origin: [-64.9922, -33.7281, -132.515]
ImageGeometry: 1
Spacing: [0.5, 0.5, 0.5]
TimeBounds: [-3.40282e+038, 3.40282e+038]
EvenlySpaced: 1
DirectionVector: [0, 0, 1]
Slices: 486
GetGeometry2D(0): PlaneGeometry (14C99F20)
IndexToWorldTransform:
Matrix:
0.5 0 0
0 0.5 0
0 0 0.5
Offset: [-64.9922, -33.7281, -132.515]
Center: [0, 0, 0]
Translation: [-64.9922, -33.7281, -132.515]
Inverse:
2 0 0
0 2 0
0 0 2
Scale : 1 1 1
BoundingBox: ( 0,158 0,158 0,1 )
Origin: [-64.9922, -33.7281, -132.515]
ImageGeometry: 1
Spacing: [0.5, 0.5, 0.5]
TimeBounds: [-3.40282e+038, 3.40282e+038]
ScaleFactorMMPerUnitX: 0.5
ScaleFactorMMPerUnitY: 0.5
Normal: [0, 0, 0.5]
More information about the Insight-users
mailing list