std::vector<double> v_iop;
float iop[6];
f->GetImageOrientationPatient(iop);
+
for(i=0; i< 6; i++)
v_iop.push_back(iop[i]);
bbSetOutputIOP(v_iop );
std::vector<double> v_ipp;
float ipp[3];
f->GetImagePositionPatient(ipp);
+
for(i=0; i< 3; i++)
v_ipp.push_back(ipp[i]);
bbSetOutputIPP(v_ipp );
std::vector<double> v_pixelspacing;
v_pixelspacing.push_back(f->GetXSpacing());
v_pixelspacing.push_back(f->GetYSpacing());
- if (f->GetZSize() != 1) {
+
+ if (f->GetZSize() != 1)
+ {
v_pixelspacing.push_back(f->GetZSpacing());
}
bbSetOutputPixelSpacing(v_pixelspacing);
void GetInfoGdcmReader::bbUserSetDefaultValues()
{
- reader=NULL;
- f=NULL;
- bbSetInputIn("");
+ reader=NULL;
+ f=NULL;
+ bbSetInputIn("");
}
void GetInfoGdcmReader::bbUserInitializeProcessing()
void GetInfoGdcmReader::bbUserFinalizeProcessing()
{
- if(reader){
+ if( reader )
+ {
reader->Delete();
- reader=NULL;
- }
- if(f){
+ reader=NULL;
+ }
+ if(f)
+ {
f->Delete();
- f=NULL;
- }
-
+ f=NULL;
+ }
}
}
std::vector<double> v_iop;
float iop[6];
f->GetImageOrientationPatient(iop);
+
for(i=0; i< 6; i++)
v_iop.push_back(iop[i]);
bbSetOutputIOP(v_iop );
std::vector<double> v_ipp;
float ipp[3];
f->GetImagePositionPatient(ipp);
+
for(i=0; i< 3; i++)
v_ipp.push_back(ipp[i]);
bbSetOutputIPP(v_ipp );
-
// Add *all the files* to the SerieHelper
sh = GDCM_NAME_SPACE::SerieHelper::New();
std::vector<std::string> gii = bbGetInputIn();
+
for(std::vector<std::string>::iterator it = gii.begin();
it != gii.end();
++it)
int nbFiles;
double zspacing = 0.;
nbFiles = l->size() ;
- sh->OrderFileList(l);
+ sh->OrderFileList(l); // this one should compute the *actual* Z Spacing!
zspacing = sh->GetZSpacing();
-
- std::vector<double> v_pixelspacing;
- v_pixelspacing.push_back( f->GetXSpacing() );
- v_pixelspacing.push_back( f->GetYSpacing() );
- v_pixelspacing.push_back( zspacing );
-// if (f->GetZSize() != 1) {
-// v_pixelspacing.push_back(f->GetZSpacing());
-// }
- bbSetOutputPixelSpacing(v_pixelspacing);
-
-
-
- if (reader!=NULL)
- {
- reader->Delete();
- reader=NULL;
- }
- reader = vtkGdcmReader::New();
+ std::vector<double> v_pixelspacing;
+ v_pixelspacing.push_back( f->GetXSpacing() );
+ v_pixelspacing.push_back( f->GetYSpacing() );
+ v_pixelspacing.push_back( zspacing );
+// if (f->GetZSize() != 1) {
+// v_pixelspacing.push_back(f->GetZSpacing());
+// }
+ bbSetOutputPixelSpacing(v_pixelspacing);
+
+ if (reader!=NULL)
+ {
+ reader->Delete();
+ reader=NULL;
+ }
+ reader = vtkGdcmReader::New();
//reader->SetFileName( bbGetInputIn().c_str() );
reader->SetCoherentFileList(l);
reader->Update();
void GetXCoherentInfoGdcmReader::bbUserSetDefaultValues()
{
- std::vector<std::string> init;
- init.push_back("");
- bbSetInputIn(init);
- reader=NULL;
+ std::vector<std::string> init;
+ init.push_back("");
+ bbSetInputIn(init);
+ reader=NULL;
}
void GetXCoherentInfoGdcmReader::bbUserInitializeProcessing()
}
// EO namespace bbgdcmvtk
-
-