void ImageProperties::DoIt()
{
+ printf("EED ImageProperties::DoIt Start \n");
BBTK_TEMPLATE_ITK_IMAGE_SWITCH(bbGetInputIn().type(),DoIt);
+ printf("EED ImageProperties::DoIt End \n");
}
/**
template<class itkImageType>
void ImageProperties::DoIt()
{
+ printf("EED <template>ImageProperties::DoIt Start \n");
bbtkDebugMessageInc("Core",9,"bbitk::ImageProperties::DoIt<"
<<bbtk::TypeName<itkImageType>()
<<">()"<<std::endl);
itkImageType* im = bbGetInputIn().get<itkImageType*>();
+
+ printf("EED <template>ImageProperties::DoIt 1 \n");
+
unsigned int dim = im->GetImageDimension();
+
bbSetOutputTypeName(bbtk::TypeName<typename itkImageType::PixelType>());
bbSetOutputDimension(dim);
const typename itkImageType::RegionType& r =im->GetLargestPossibleRegion();
bbSetOutputLargestPossibleRegion(r);
+ printf("EED <template>ImageProperties::DoIt 2 \n");
+
const typename itkImageType::IndexType& ind = r.GetIndex();
std::vector<int> vind;
for (unsigned int i=0;i<dim;++i)
std::vector<int> vsz;
for (unsigned int i=0;i<dim;++i)
vsz.push_back(sz[i]);
-
+
+ printf("EED <template>ImageProperties::DoIt 3 \n");
+
// brute hack to avoid failure of most black boxes that expects 3D images. // JPR
if (dim==2)
vsz.push_back(1);
vog.push_back(1.0);
bbSetOutputOrigin(vog);
+ printf("EED <template>ImageProperties::DoIt 4 \n");
typename itkImageType::SpacingType sp = im->GetSpacing();
- std::vector<float> vsp;
+ std::vector<double> vsp;
for (unsigned int i=0;i<dim;++i)
- vsp.push_back(sp[i]);
+ vsp.push_back(double(sp[i]));
// brute hack to avoid failure of most black boxes that expects 3D images. // JPR
if (dim==2)
vminmax.push_back( (float) (minMaxCalculator->GetMinimum()) );
vminmax.push_back( (float) (minMaxCalculator->GetMaximum()) );
bbSetOutputMinMax(vminmax);
-
+
+ printf("EED <template>ImageProperties::DoIt 5 \n");
+
+
bbtkDebugDecTab("Core",9);
+ printf("EED <template>ImageProperties::DoIt End \n");
}
-}
-// eo namespace bbtk
+
+
+} // eo namespace bbtk
#endif