** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.54 2001/01/07 23:18:13 kevin Exp $
+** $Id: views.cpp,v 1.63 2001/01/16 20:55:29 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
{
#if CTSIM_MDI
- wxMDIChildFrame *subframe = new wxMDIChildFrame(theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
+ wxMDIChildFrame *subframe = new wxMDIChildFrame (theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
#else
- wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
+ wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
#endif
-
+ theApp->setIconForFrame (subframe);
+
wxMenu *file_menu = new wxMenu;
file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...");
if (v != NULL && yCursor < ny) {
double* pX = new double [nx];
double* pYReal = new double [nx];
- double *pYImag, *pYMag;
+ double *pYImag = NULL;
+ double *pYMag = NULL;
if (rIF.isComplex()) {
pYImag = new double [nx];
pYMag = new double [nx];
rPlotFile.addColumn (2, pYImag);
rPlotFile.addColumn (3, pYMag);
}
- for (int iL = 0; iL < rIF.nLabels(); iL++)
+ for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
*theApp->getLog() << os.str().c_str() << "\n";
if (v != NULL && xCursor < nx) {
double* pX = new double [ny];
double* pYReal = new double [ny];
- double *pYImag, *pYMag;
+ double* pYImag = NULL;
+ double* pYMag = NULL;
if (rIF.isComplex()) {
pYImag = new double [ny];
pYMag = new double [ny];
rPlotFile.addColumn (2, pYImag);
rPlotFile.addColumn (3, pYMag);
}
- for (int iL = 0; iL < rIF.nLabels(); iL++)
+ for (unsigned int iL = 0; iL < rIF.nLabels(); iL++)
rPlotFile.addDescription (rIF.labelGet(iL).getLabelString().c_str());
os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
*theApp->getLog() << os.str().c_str() << "\n";
unsigned int iL;
for (iL = 0; iL < rIF.nLabels(); iL++) {
- std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle();
+ std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
s += ": ";
s += rIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (s.c_str());
}
- for (iL = 0; iL < rIF.nLabels(); iL++) {
- std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+ for (iL = 0; iL < rCompareIF.nLabels(); iL++) {
+ std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
s += ": ";
s += rCompareIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (s.c_str());
}
- os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle() << " and "
- << pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+ os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
+ << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
*theApp->getLog() << os.str().c_str() << "\n";
rPlotFile.addDescription (os.str().c_str());
}
rPlotFile.addColumn (2, pY2);
unsigned int iL;
for (iL = 0; iL < rIF.nLabels(); iL++) {
- std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle();
+ std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
s += ": ";
s += rIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (s.c_str());
}
- for (iL = 0; iL < rIF.nLabels(); iL++) {
- std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+ for (iL = 0; iL < rCompareIF.nLabels(); iL++) {
+ std::string s = pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
s += ": ";
s += rCompareIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (s.c_str());
}
- os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle() << " and "
- << pCompareDoc->GetFirstView()->GetFrame()->GetTitle();
+ os << " Between " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str() << " and "
+ << pCompareDoc->GetFirstView()->GetFrame()->GetTitle().c_str();
*theApp->getLog() << os.str().c_str() << "\n";
rPlotFile.addDescription (os.str().c_str());
}
rPlotFile.addColumn (0, pX);
rPlotFile.addColumn (1, pY);
for (unsigned int iL = 0; iL < rIF.nLabels(); iL++) {
- std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle();
+ std::string s = GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
s += ": ";
s += rIF.labelGet(iL).getLabelString();
rPlotFile.addDescription (s.c_str());
}
- os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle();
+ os << " Plot of " << GetDocument()->GetFirstView()->GetFrame()->GetTitle().c_str();
*theApp->getLog() << os.str().c_str() << "\n";
rPlotFile.addDescription (os.str().c_str());
delete pX;
#else
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(10, 10), wxSize(256, 256), wxDEFAULT_FRAME_STYLE);
#endif
+ theApp->setIconForFrame (subframe);
wxMenu *file_menu = new wxMenu;
const Projections& rProj = GetDocument()->getProjections();
imageFile.setArraySize (m_iDefaultNX, m_iDefaultNY);
- if (m_iDefaultFilterMethod != ProcessSignal::FILTER_METHOD_CONVOLUTION && m_iDefaultFilterGeneration == ProcessSignal::FILTER_GENERATION_DIRECT && rProj.geometry() != Scanner::GEOMETRY_PARALLEL) {
- wxMessageBox ("Sorry!\nCurrently, frequency-based filtering with direct filter generation is not support for geometries other than parallel.\nAborting command.", "Not Supported", wxOK | wxICON_WARNING, m_frame);
- return;
- }
-
Reconstructor* pReconstruct = new Reconstructor (rProj, imageFile, optFilterName.c_str(), m_dDefaultFilterParam, optFilterMethodName.c_str(), m_iDefaultZeropad, optFilterGenerationName.c_str(), optInterpName.c_str(), m_iDefaultInterpParam, optBackprojectName.c_str(), m_iDefaultTrace);
Timer timerRecon;
#else
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
#endif
+ theApp->setIconForFrame (subframe);
wxMenu *file_menu = new wxMenu;
#else
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(10, 10), wxSize(500, 300), wxDEFAULT_FRAME_STYLE);
#endif
+ theApp->setIconForFrame (subframe);
wxMenu *file_menu = new wxMenu;