[Insight-users] CastImageFilter Error
ariel
curiale at gmail.com
Tue Jul 10 12:43:49 EDT 2012
Hi,
I've had some troubles after xcode update (from 4.1 to 4.3.3).
When I compiled ITK-3.20.1 I had too many warnings like this:
InsightToolkit-3.20.1/Utilities/vxl/core/vnl/vnl_math.h:86:36: warning:
in-class initializer for static data member of type 'const double' is a GNU
extension [-Wgnu] static VNL_DLL_DATA const double e
VCL_STATIC_CONST_INIT_FLOAT_DECL(2.7182818284590452354);
Second, I made a simple program and I can't explain why this code exit with
segmentation fault:
typedef itk::CastImageFilter < MovingImageType, InternalImageType >
MovingCasterType;
MovingCasterType::Pointer movingImageCaster =
MovingCasterType::New();
movingImageCaster->SetInput( movingImageReader->GetOutput() );
std::cout<<"0"<<std::endl;
try
{
movingImageCaster->Update();
}
catch( itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
return -1;
}
The input of the caster filter is:
Image (0x7fc201cda600)
RTTI typeinfo: itk::Image<double, 2u>
Reference Count: 3
Modified Time: 307
Debug: Off
Observers:
none
Source: (0x7fc201cde1f0)
Source output index: 0
Release Data: Off
Data Released: False
Global Release Data: Off
PipelineMTime: 179
UpdateMTime: 308
LargestPossibleRegion:
Dimension: 2
Index: [0, 0]
Size: [800, 600]
BufferedRegion:
Dimension: 2
Index: [0, 0]
Size: [800, 600]
RequestedRegion:
Dimension: 2
Index: [0, 0]
Size: [800, 600]
Spacing: [1, 1]
Origin: [0, 0]
Direction:
1 0
0 1
IndexToPointMatrix:
1 0
0 1
PointToIndexMatrix:
1 0
0 1
PixelContainer:
ImportImageContainer (0x7fc201cde360)
RTTI typeinfo: itk::ImportImageContainer<unsigned long, double>
Reference Count: 1
Modified Time: 306
Debug: Off
Observers:
none
Pointer: 0x108d15000
Container manages memory: true
Size: 480000
Capacity: 480000
Thanks,
Ariel.
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/CastImageFilter-Error-tp7580458.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list