//--------------------------------------------------------------------
// display
-#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;
-#define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_<n; _i_++) { std::cout << a[_i_] << " "; }; std::cout << " ]" << std::endl;}
+#define DD(a) std::cout << #a " = [ " << a << " ]" << std::endl;std::cout.flush();
+#define DDV(a,n) { std::cout << #a " = [ "; for(unsigned int _i_=0; _i_<n; _i_++) { std::cout << a[_i_] << " "; }; std::cout << " ]" << std::endl;std::cout.flush();}
template<class T>
void _print_container(T const& a)
{ for(typename T::const_iterator i=a.begin();i!=a.end();++i) { std::cout << *i << " "; };}
-#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;}
+#define DDS(a) { std::cout << #a " = [ "; _print_container(a) ; std::cout << " ]" << std::endl;std::cout.flush():}
//--------------------------------------------------------------------
// when everything goes wrong
// Contour type [Contour Geometric Type]
mType = item->GetEntryValue(0x3006,0x0042);
// DD(mType);
- if (mType != "CLOSED_PLANAR ") { ///WARNING to the space after the name ...
- std::cerr << "Skip this contour : type=" << mType << std::endl;
+ if (mType != "CLOSED_PLANAR " && mType != "POINT ") { ///WARNING to the space after the name ...
+ //std::cerr << "Skip this contour : type=" << mType << std::endl;
return false;
}
+ if (mType == "POINT ") {
+ std::cout << "Warning: POINT type not fully supported. (don't use GetMesh() with this!)"
+ << std::endl;
+ }
// Number of points [Number of Contour Points]
mNbOfPoints = parse_value<int>(item->GetEntryValue(0x3006,0x0046));
void Print(std::ostream & os = std::cout) const;
bool Read(gdcm::SQItem * item);
vtkPolyData * GetMesh();
+ vtkPoints * GetPoints() {return mData;}
protected:
void ComputeMesh();
return mMesh;
}
//--------------------------------------------------------------------
-
+clitk::DicomRT_Contour * clitk::DicomRT_ROI::GetContour(int n)
+{
+ return mListOfContours[n];
+}
//--------------------------------------------------------------------
void clitk::DicomRT_ROI::ComputeMesh()
void SetForegroundValueLabelImage(double bg);
void SetImage(vvImage * im);
+ DicomRT_Contour* GetContour(int n);
protected:
void ComputeMesh();
GetOptionsFromGUI();
// Create the command string
- char *command_string =
+ /*
+ const char *command_string =
"[STAGE]\n"
"xform=bspline\n"
"max_its=30\n"
"grid_spac=100 100 100\n"
"res=4 4 2\n"
;
+ */
// Prepare the registration
/*