[ITK Community] [Insight-users] Problem in using ResampleImageFilter on vtkImageData.
abhishek
abhishek at meddiff.com
Sun Nov 10 00:44:09 EST 2013
Hello Users,I want to fuse RT-Dose and CT-Slice. For this I am trying to
translate RT-Dose's vtkImageData* so that it is placed appropriately on
CT-Slice for blending.******************************************This is what
I am doing in pipeline:**// Step:1 - convert vtkImageData* to
itk::Image.*VTKImageToImageType::Pointer vtkImageToImageFilter =
VTKImageToImageType::New();vtkImageToImageFilter->SetInput(CT_Reslice->GetOutput());vtkImageToImageFilter->Update();vtkImageToImageFilter->GetOutput()->Print(cout);*//
Step:2 - define itk::TranslationTransform*typedef
itk::TranslationTransform<double,2>
TranslationTransformType;TranslationTransformType::Pointer transform =
TranslationTransformType::New();TranslationTransformType::OutputVectorType
translation;translation[0] = 50;translation[1] =
50;transform->Translate(translation);*// Step:3 - define
itk::ResampleImageFilter*typedef itk::ResampleImageFilter<ImageType,
ImageType> ResampleImageFilterType;ResampleImageFilterType::Pointer
resampleFilter =
ResampleImageFilterType::New();resampleFilter->SetTransform(transform.GetPointer());resampleFilter->SetInput(vtkImageToImageFilter->GetOutput());resampleFilter->Update();resampleFilter->GetOutput()->Print(cout);*//
step:4 - use ImageToVTKImageFilter convert ResampleImageFilter output to vtk
image*typedef itk::ImageToVTKImageFilter
ConnectorType;ConnectorType::Pointer connector =
ConnectorType::New();connector->SetInput(resampleFilter->GetOutput());connector->Update();******************************************I
recorded output's at two points 1. after converting vtkImageData to
itk::Image & 2. after running itk::ResampleImageFilter*output for 1:*Image
(034AF440) RTTI typeinfo: class itk::Image<short,3> Reference Count: 1
Modified Time: 62 Debug: Off Observers: none Source: (034AF2C8)
Source output name: Primary Release Data: Off Data Released: False Global
Release Data: Off PipelineMTime: 54 UpdateMTime: 63 RealTimeStamp: 0
seconds LargestPossibleRegion: Dimension: 3 Index: [0, 0, 0]
Size: [518, 518, 1] BufferedRegion: Dimension: 3 Index: [0, 0, 0]
Size: [518, 518, 1] RequestedRegion: Dimension: 3 Index: [0, 0, 0]
Size: [518, 518, 1] Spacing: [1.25, 1.25, 2.5] Origin: [-186.397,
-125.147, 0] Direction: 1 0 00 1 00 0 1 IndexToPointMatrix: 1.25 0 00 1.25
00 0 2.5 PointToIndexMatrix: 0.8 0 00 0.8 00 0 0.4 Inverse Direction: 1 0
00 1 00 0 1 PixelContainer: ImportImageContainer (00945610) RTTI
typeinfo: class itk::ImportImageContainer Reference Count: 1
Modified Time: 61 Debug: Off Observers: none Pointer:
00A40040 Container manages memory: false Size: 268324
Capacity: 268324*output for 2:*Image (034AF878) RTTI typeinfo: class
itk::Image<short,3> Reference Count: 1 Modified Time: 92 Debug: Off
Observers: none Source: (034AF6A0) Source output name: Primary
Release Data: Off Data Released: False Global Release Data: Off
PipelineMTime: 80 UpdateMTime: 93 RealTimeStamp: 0 seconds
LargestPossibleRegion: Dimension: 3 Index: [0, 0, 0] Size: [0, 0,
0] BufferedRegion: Dimension: 3 Index: [0, 0, 0] Size: [0, 0, 0]
RequestedRegion: Dimension: 3 Index: [0, 0, 0] Size: [0, 0, 0]
Spacing: [1, 1, 1] Origin: [0, 0, 0] Direction: 1 0 00 1 00 0 1
IndexToPointMatrix: 1 0 00 1 00 0 1 PointToIndexMatrix: 1 0 00 1 00 0 1
Inverse Direction: 1 0 00 1 00 0 1 PixelContainer: ImportImageContainer
(009453E0) RTTI typeinfo: class itk::ImportImageContainer
Reference Count: 1 Modified Time: 90 Debug: Off Observers:
none Pointer: 034AEFF0 Container manages memory: true Size: 0
Capacity: 0What am I doing wrong here?? Can somebody point
out.Regards,Abhishek.
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-in-using-ResampleImageFilter-on-vtkImageData-tp7584325.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
_____________________________________
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
More information about the Community
mailing list