- {
- item = new HistogramDialogComboBoxItem();
- }else if((int)(line.find("<greyValue>"))!=-1){
- int pos1=line.find(">");
- int pos2=line.find("<",pos1+1);
- std::string x=line.substr(pos1+1,pos2-pos1-1);
- gvtransfer=atof(x.c_str());
- greyvecttransfunct.push_back(gvtransfer);
- }else if((int)(line.find("<intensity>"))!=-1){
- int pos1=line.find(">");
- int pos2=line.find("<",pos1+1);
- std::string x=line.substr(pos1+1,pos2-pos1-1);
- intensity=atof(x.c_str());
- value.push_back(intensity);
- }
- else if( (int)(line.find("<RGBgreyValue>"))!=-1)
- {
- int pos1=line.find(">");
- int pos2=line.find("<",pos1+1);
- std::string x=line.substr(pos1+1,pos2-pos1-1);
- gv=atof(x.c_str());
- greyvect.push_back(gv);
- }
- else if( (int)(line.find("<red>"))!=-1)
- {
- int pos1=line.find(">");
- int pos2=line.find("<",pos1+1);
- std::string x=line.substr(pos1+1,pos2-pos1-1);
- red=atof(x.c_str());
- redvect.push_back(red);
- }
- else if( (int)(line.find("<green>"))!=-1)
- {
- int pos1=line.find(">");
- int pos2=line.find("<",pos1+1);
- std::string x=line.substr(pos1+1,pos2-pos1-1);
- gr=atof(x.c_str());
- greenvect.push_back(gr);
- }
- else if( (int)(line.find("<blue>"))!=-1 )
- {
- int pos1=line.find(">");
- int pos2=line.find("<",pos1+1);
- std::string x=line.substr(pos1+1,pos2-pos1-1);
- bl=atof(x.c_str());
- bluevect.push_back(bl);
-
- }else if( (int)(line.find("</ComboBoxItem>"))!=-1 ){
-
- item->SetColors(greyvect,redvect,greenvect,bluevect);
- item->SetTransferFunction(greyvecttransfunct,value);
- for(int i = 0; i < greyvecttransfunct.size();i++){
+ {
+ item = new HistogramDialogComboBoxItem();
+ }else if((int)(line.find("<greyValue>"))!=-1) {
+ int pos1=line.find(">");
+ int pos2=line.find("<",pos1+1);
+ std::string x=line.substr(pos1+1,pos2-pos1-1);
+ gvtransfer=atof(x.c_str());
+ greyvecttransfunct.push_back(gvtransfer);
+ }else if((int)(line.find("<intensity>"))!=-1) {
+ int pos1=line.find(">");
+ int pos2=line.find("<",pos1+1);
+ std::string x=line.substr(pos1+1,pos2-pos1-1);
+ intensity=atof(x.c_str());
+ value.push_back(intensity);
+ }
+ else if( (int)(line.find("<RGBgreyValue>"))!=-1)
+ {
+ int pos1=line.find(">");
+ int pos2=line.find("<",pos1+1);
+ std::string x=line.substr(pos1+1,pos2-pos1-1);
+ gv=atof(x.c_str());
+ greyvect.push_back(gv);
+ }
+ else if( (int)(line.find("<red>"))!=-1)
+ {
+ int pos1=line.find(">");
+ int pos2=line.find("<",pos1+1);
+ std::string x=line.substr(pos1+1,pos2-pos1-1);
+ red=atof(x.c_str());
+ redvect.push_back(red);
+ }
+ else if( (int)(line.find("<green>"))!=-1)
+ {
+ int pos1=line.find(">");
+ int pos2=line.find("<",pos1+1);
+ std::string x=line.substr(pos1+1,pos2-pos1-1);
+ gr=atof(x.c_str());
+ greenvect.push_back(gr);
+ }
+ else if( (int)(line.find("<blue>"))!=-1 )
+ {
+ int pos1=line.find(">");
+ int pos2=line.find("<",pos1+1);
+ std::string x=line.substr(pos1+1,pos2-pos1-1);
+ bl=atof(x.c_str());
+ bluevect.push_back(bl);
+
+ }else if( (int)(line.find("</ComboBoxItem>"))!=-1 ) {
+
+ item->SetColors(greyvect,redvect,greenvect,bluevect);
+ item->SetTransferFunction(greyvecttransfunct,value);
+ /*for(int i = 0; i < greyvecttransfunct.size();i++){