From: Kevin M. Rosenberg Date: Wed, 20 Dec 2000 14:52:30 +0000 (+0000) Subject: r308: plotfile changes X-Git-Tag: debian-4.5.3-3~709 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=efc398029330f4d9170257db29e4420e50f25625 r308: plotfile changes --- diff --git a/msvc/ctsim/ctsim.plg b/msvc/ctsim/ctsim.plg index 0ac5c94..64467e7 100644 --- a/msvc/ctsim/ctsim.plg +++ b/msvc/ctsim/ctsim.plg @@ -6,13 +6,13 @@ --------------------Configuration: ctsim - Win32 Debug--------------------

Command Lines

-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD3.tmp" with contents +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPEA.tmp" with contents [ /nologo /G6 /MTd /W3 /Gm /GR /GX /ZI /Od /I "\wx2\include" /I "." /I "..\..\include" /I "..\..\getopt" /I "..\..\..\lpng108" /I "..\..\..\zlib" /I "..\..\..\fftw-2.1.3\fftw" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"2.5.0\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"2.5.0\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\ctsim-2.0.6\src\views.cpp" ] -Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD3.tmp" -Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD4.tmp" with contents +Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPEA.tmp" +Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPEB.tmp" with contents [ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ../libctsim/Debug/libctsim.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\lpng108\msvc\win32\libpng\lib_dbg\libpng.lib ..\..\..\lpng108\msvc\win32\zlib\lib_dbg\zlib.lib libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib ../../../wx2/lib/wxd.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /nodefaultlib:"msvcrtd.lib" /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"..\..\..\lpng108\msvc\win32\libpng\lib" /libpath:"..\..\..\lpng108\msvc\win32\zlib\lib" ".\Debug\ctsim.obj" @@ -27,22 +27,10 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w "\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib" "\wx2\lib\wxd.lib" ] -Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPD4.tmp" +Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPEB.tmp"

Output Window

Compiling... views.cpp -c:\program files\microsoft visual studio\vc98\include\vector(48) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information - c:\ctsim-2.0.6\include\plotfile.h(74) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -c:\program files\microsoft visual studio\vc98\include\vector(61) : warning C4786: '??0?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@0ABV?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@1@@Z' : identifier was truncated to '255' characters in the browser information - c:\ctsim-2.0.6\include\plotfile.h(74) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -c:\program files\microsoft visual studio\vc98\include\vector(103) : warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - c:\ctsim-2.0.6\include\plotfile.h(74) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -c:\program files\microsoft visual studio\vc98\include\vector(105) : warning C4786: '?rbegin@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - c:\ctsim-2.0.6\include\plotfile.h(74) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -c:\program files\microsoft visual studio\vc98\include\vector(107) : warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QAE?AV?$reverse_iterator@PAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@AAV12@PAV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - c:\ctsim-2.0.6\include\plotfile.h(74) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled -c:\program files\microsoft visual studio\vc98\include\vector(108) : warning C4786: '?rend@?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@QBE?AV?$reverse_iterator@PBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V12@ABV12@PBV12@H@2@XZ' : identifier was truncated to '255' characters in the browser information - c:\ctsim-2.0.6\include\plotfile.h(74) : see reference to class template instantiation 'std::vector,class std::allocator >,class std::allocator,class std::allocator > > >' being compiled c:\program files\microsoft visual studio\vc98\include\vector(114) : warning C4786: 'std::reverse_iterator,std::allocator > const *,std::basic_string,std::allocator >,std::basic_string,std::allocator > const &,std::basic_string,std::allocator > const *,int>' : identifier was truncated to '255' characters in the debug information c:\program files\microsoft visual studio\vc98\include\vector(114) : while compiling class-template member function 'unsigned int __thiscall std::vector,std::allocator >,std::allocator,std::allocator > > >::size(void) const' c:\program files\microsoft visual studio\vc98\include\vector(114) : warning C4786: 'std::reverse_iterator,std::allocator > *,std::basic_string,std::allocator >,std::basic_string,std::allocator > &,std::basic_string,std::allocator > *,int>' : identifier was truncated to '255' characters in the debug information @@ -50,12 +38,13 @@ c:\program files\microsoft visual studio\vc98\include\vector(114) : warning C478 Linking... Creating command line "bscmake.exe /nologo /o"Debug/ctsim.bsc" ".\Debug\ctsim.sbr" ".\Debug\dialogs.sbr" ".\Debug\dlgprojections.sbr" ".\Debug\dlgreconstruct.sbr" ".\Debug\docs.sbr" ".\Debug\views.sbr"" Creating browse info file... +BSCMAKE: warning BK4503 : minor error in .SBR file '.\Debug\views.sbr' ignored

Output Window

Results

-ctsim.exe - 0 error(s), 8 warning(s) +ctsim.exe - 0 error(s), 3 warning(s) diff --git a/src/views.cpp b/src/views.cpp index d3827f0..d40fd5e 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: views.cpp,v 1.32 2000/12/20 14:39:09 kevin Exp $ +** $Id: views.cpp,v 1.33 2000/12/20 14:52:30 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 @@ -432,15 +432,17 @@ ImageFileView::OnPlotRow (wxCommandEvent& event) sys_error (ERR_SEVERE, "Internal error: unable to create Plot file"); } else { PlotFile& rPlot = pPlotDoc->getPlotFile(); - rPlot.setTitle("Row Plot"); + std::ostringstream title; + title << "Row " << yCursor; + rPlot.setTitle(title.str()); rPlot.setXLabel("Column"); rPlot.setYLabel("Pixel Value"); rPlot.setCurveSize (2, nx); rPlot.addColumn (0, pX); rPlot.addColumn (1, pY); - delete pX; - delete pY; } + delete pX; + delete pY; } } @@ -460,16 +462,35 @@ ImageFileView::OnPlotCol (wxCommandEvent& event) int ny = rIF.ny(); if (v != NULL && xCursor < nx) { - double* pVec = new double [ny]; + double* pX = new double [ny]; + double* pY = new double [ny]; double minVal = v[xCursor][0]; double maxVal = minVal; for (int i = 0; i < ny; i++) { - if (minVal < v[xCursor][i]) - minVal = v[xCursor][i]; - else if (maxVal > v[xCursor][i]) - maxVal = v[xCursor][i]; - pVec[i] = v[xCursor][i]; + double y = v[xCursor][i]; + if (minVal < y) + minVal = y; + else if (maxVal > y) + maxVal = y; + pX[i] = i; + pY[i] = y; + } + PlotFileDocument* pPlotDoc = dynamic_cast(theApp->getDocManager()->CreateDocument("untitled.plt", wxDOC_SILENT)); + if (! pPlotDoc) { + sys_error (ERR_SEVERE, "Internal error: unable to create Plot file"); + } else { + PlotFile& rPlot = pPlotDoc->getPlotFile(); + std::ostringstream title; + title << "Column " << xCursor; + rPlot.setTitle(title.str()); + rPlot.setXLabel("Row"); + rPlot.setYLabel("Pixel Value"); + rPlot.setCurveSize (2, nx); + rPlot.addColumn (0, pX); + rPlot.addColumn (1, pY); } + delete pX; + delete pY; } }