BBTK_BLACK_BOX_IMPLEMENTATION(GetXCoherentInfoGdcmReader,bbtk::AtomicBlackBox);
void GetXCoherentInfoGdcmReader::Process()
{
BBTK_BLACK_BOX_IMPLEMENTATION(GetXCoherentInfoGdcmReader,bbtk::AtomicBlackBox);
void GetXCoherentInfoGdcmReader::Process()
{
-
- 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);
-
-
-
-
+ 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 = vtkGdcmReader::New();
//reader->SetFileName( bbGetInputIn().c_str() );
reader->SetCoherentFileList(l);