[Insight-users] about OffsetVector in itkScalarImageTextureCalculator.h

barbababa tonimuusimaki at gmail.com
Sun Mar 25 08:51:53 EDT 2012



Hello!

I am trying to make an offsetvector for the command 

textureFilter->SetOffsets();

in itkScalarImageTextureCalculator.h

Currently this builds but it only returns zeros for the feature values:

                typedef itk::Image<float, 2> ImageType;
		typedef ImageType::OffsetType OffsetType ;
		OffsetType offset;
		typedef itk::VectorContainer<unsigned char, OffsetType> 
VectorContainerType;
		VectorContainerType::Pointer points = VectorContainerType::New();
               
	        VectorContainerType::Iterator point = points->Begin();
                points->Reserve(1);
               
			offset[0] =  -1.0; 
                        offset[1] =  0.0; 
			point->Value() = offset;
			textureFilter->SetOffsets(points);

I think this is because i am not using the Offsetvector.
But how would i do this with the Offsetvector???
The code works perfectly if i do not define any offsets and use the
defaults.

Thanks
-- 
View this message in context: http://old.nabble.com/about-OffsetVector-in-itkScalarImageTextureCalculator.h-tp33544702p33544702.html
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list