// Class definition include
//----------------------------------------------------------------------------------------------------------------
-
#include "wxContourGUIExample.h"
#include "wxContourMainFrame.h"
//#include "OutlineModelManager.h"
//#include "SomeEnvironment.h"
//#include "ReaderEnvironment.h"
-
-
-
//#include "interfMainPanel.h"
interfSegmentationPanelITK::interfSegmentationPanelITK(wxWindow * parent)
: wxPanel(parent, -1, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN)
{
- int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
+// int sizeZ = interfMainPanel::getInstance()->GetImageDataSizeZ();
//int sizeZ = _theViewPanel->getSceneManager()->GetImageDataSizeZ();
double range[2];
//_theViewPanel->getSceneManager()->GetImageDataRange(range);
interfMainPanel::getInstance()->GetImageDataRange(range);
//The labels
- wxStaticText * distance = new wxStaticText(this, wxID_ANY, wxT("Initial Distance"), wxPoint(5, 5));
- wxStaticText * sigma = new wxStaticText(this, wxID_ANY, wxT("Sigma"), wxPoint(5, 30));
- wxStaticText * alfa = new wxStaticText(this, wxID_ANY, wxT("Sigmoid Alfa"), wxPoint(5, 55));
- wxStaticText * beta = new wxStaticText(this, wxID_ANY, wxT("Sigmoid Beta"), wxPoint(5, 80));
- wxStaticText * propagation = new wxStaticText(this, wxID_ANY, wxT("Propagation Scaling"),wxPoint(5, 105));
- wxStaticText * iterations = new wxStaticText(this, wxID_ANY, wxT("Iterations"), wxPoint(5, 130));
- wxStaticText * infStrength = new wxStaticText(this, wxID_ANY, wxT("Inflation Strength"), wxPoint(5, 155));
+ //wxStaticText * distance =
+ new wxStaticText(this, wxID_ANY, wxT("Initial Distance"), wxPoint(5, 5));
+ //wxStaticText * sigma =
+ new wxStaticText(this, wxID_ANY, wxT("Sigma"), wxPoint(5, 30));
+ //wxStaticText * alfa =
+ new wxStaticText(this, wxID_ANY, wxT("Sigmoid Alfa"), wxPoint(5, 55));
+ //wxStaticText * beta =
+ new wxStaticText(this, wxID_ANY, wxT("Sigmoid Beta"), wxPoint(5, 80));
+ //wxStaticText * propagation =
+ new wxStaticText(this, wxID_ANY, wxT("Propagation Scaling"),wxPoint(5, 105));
+ //wxStaticText * iterations =
+ new wxStaticText(this, wxID_ANY, wxT("Iterations"), wxPoint(5, 130));
+ //wxStaticText * infStrength =
+ new wxStaticText(this, wxID_ANY, wxT("Inflation Strength"), wxPoint(5, 155));
//Text Controls
_infStrength = new wxTextCtrl(this, wxID_ANY, wxT("3.0"), wxPoint(98,155), wxSize(80, 20), 0, wxDefaultValidator, wxTextCtrlNameStr);
//El boton
- wxButton * bot = new wxButton(this, 6, wxT("One Slice"), wxPoint(98, 180), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
+ //wxButton * bot =
+ new wxButton(this, 6, wxT("One Slice"), wxPoint(98, 180), wxSize(70, 25), 0, wxDefaultValidator, wxT("button"));
//Conexion del boton con su respectivo manejador
Connect(6, wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction) &interfSegmentationPanelITK::onSegmentationOneSlice);
} else {
angle = this->_lstBullEyeDetailAngle[nCrown]->GetValue();
}
- double numOfSec = (double)GetNumberOfSections(nCrown);
+// double numOfSec = (double)GetNumberOfSections(nCrown);
double deltaSec = GetAngDeltaOfCrownSection(nCrown);
return angle + section*deltaSec ;
}
typedef unsigned short OutputPixelType2;
typedef itk::Image< OutputPixelType2, Dimension > OutputImageType2;
- //Definición del thresholder
+ //DefiniciÛn del thresholder
typedef itk::BinaryThresholdImageFilter<
InternalImageType,
OutputImageType > ThresholdingFilterType;
- //Definición del primer filtro de conversión de pixeles
+ //DefiniciÛn del primer filtro de conversiÛn de pixeles
typedef itk::CastImageFilter<
OutputImageType, OutputImageType2 > CastFilterType;
- //Definición del segundo tipo de conversión de pixeles
+ //DefiniciÛn del segundo tipo de conversiÛn de pixeles
typedef itk::CastImageFilter<
OutputImageType2, InternalImageType > CastFilterType2;
- //Tercer tipo de conversión
+ //Tercer tipo de conversiÛn
typedef itk::RescaleIntensityImageFilter<
InternalImageType,
OutputImageType > CastFilterType3;
- //Cuarto tipo de conversión
+ //Cuarto tipo de conversiÛn
typedef itk::RescaleIntensityImageFilter<
OutputImageType,
OutputImageType > CastFilterType4;
thresholder->SetOutsideValue( 255 );
thresholder->SetInsideValue( 0 );
- //Definción de conexiónes entre VTK e ITK y el writer
+ //DefinciÛn de conexiÛnes entre VTK e ITK y el writer
typedef itk::VTKImageToImageFilter<OutputImageType2> ConnectorType;
typedef itk::ImageToVTKImageFilter<OutputImageType> ConnectorType2;
typedef itk::ImageFileWriter< OutputImageType > WriterType;
std::cout<<" x Anterior "<<xAct<<" x actual "<<x<<std::endl;
std::cout<<" y Anterior "<<yAct<<" y actual "<<y<<std::endl;
std::cout<<" x "<<p[0]<<" y "<<p[1]<<std::endl;
- vecZ.push_back( -900 );
+ vecZ.push_back( 900 );
xAct=x;
yAct=y;
}
std::cout<<" y Anterior "<<yAct<<" y actual "<<y<<std::endl;
std::cout<<" x "<<p[0]<<" y "<<p[1]<<std::endl;
vecY.push_back( p[1] );
- vecZ.push_back( -900 );
+ vecZ.push_back( 900 );
xAct=x;
yAct=y;
}
vecX.push_back(vecXo.back());
std::cout<<" x Siguiente "<<vecXo.back();
vecXo.pop_back();
- vecZ.push_back( -900 );
+ vecZ.push_back( 900 );
}
while(!vecYo.empty())
{
// double y=p[1];
vecX.push_back( p[0] );
vecY.push_back( p[1] );
- vecZ.push_back( -900 );
+ vecZ.push_back( 900 );
// vecZ.push_back( p[2] );
}
//}
//JCP 26 - 11 - 08
- }
+ }
/**
* Handles the event wxEVT_TSBAR_START from the horizontal bar
*/
*/
void wxContourViewPanel :: onSelectionEnd_Horizontal(wxCommandEvent& event)
{
-
+
}
/**
* Handles the event wxEVT_TSBAR_MOVED from the horizontal bar
*/
void wxContourViewPanel :: onStartChange_Bar_Vertical(wxCommandEvent& event)
{
- int nxStart_v = getStartVertical();
+// int nxStart_v = getStartVertical();
}
/**
* Handles the event wxEVT_TSBAR_END from the vertical bar
*/
void wxContourViewPanel :: onEndChange_Bar_Vertical(wxCommandEvent& event)
{
- int nxEnd_v = getEndVertical();
+// int nxEnd_v = getEndVertical();
}
/**
* Handles the event wxEVT_SELECTION_END from the vertical bar
*/
void wxContourViewPanel :: onMovedBar_Vertical(wxCommandEvent& event)
{
- int nxStart_v = getStartVertical();
- int nxEnd_v = getEndVertical();
+// int nxStart_v = getStartVertical();
+// int nxEnd_v = getEndVertical();
}
std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
- int elementsSelected = currentSelection.size();
+// int elementsSelected = currentSelection.size();
bool ctrlKey = _sceneManager->isCtrlPressed();
char toolCommand = _sceneManager->getLastKeyCode();
}
else
{
- for(int i=0; i<_concepts->size(); i++)
+ for(int i=0; i< (int)(_concepts->size()); i++)
{
changeResolutionAtConceptControl( (*_concepts)[i] );
}
{
int size = _concepts->size();
wxConceptControl * aConcept = NULL;
- int accum = 0;
+// int accum = 0;
for(int i = 0; i < eventConcept->getNumCheckBox();i++){
if(i!=groupID){
void wxInstantChooserPanel :: setInstant(std::vector<int> choiceInstant)
{
int max = _concepts->size();
- if( choiceInstant.size() == max )
+ if( (int)(choiceInstant.size()) == max )
{
int i = 0;
while(i< max)
bool isChecked = false;
int i,size = _concepts->size();
- wxConceptControl * aConcept = NULL;
+// wxConceptControl * aConcept = NULL;
for ( i=0; i<size && !isChecked; i++ )
{
if( (*_concepts)[i]->getName().compare( theConceptName ) == 0 )
}
void KernelManagerContour::setVectImages(std::vector<vtkImageData*> vectimg){
- for(int i = 0; i < vectimg.size(); i++){
+ for(int i = 0; i < (int)(vectimg.size()); i++){
vtkImageData* img = vectimg[i];
vtkImageChangeInformation* change = vtkImageChangeInformation::New();
change->SetInformationInput(img);
std::map<std::string, AxeThing *>* axesMap = new std::map<std::string, AxeThing *>();
std::map<std::string, ContourThing *>* outlinesMap = new std::map<std::string, ContourThing *>();
- for(int i = 0; i < vectimages.size(); i++){
+ for(int i = 0; i < (int)(vectimages.size()); i++){
vtkImageData* selectedimage = vectimages[i];
ImageSourceThing * thing = new ImageSourceThing(selectedimage);
std::string imgstring = "Source Image "+intToString(i+1);
for (int j=0 ; j<sizeCtrPt ; j++)
{
//JSTG_16-07-08_----------------------------------------------------------------
- manModelContour->AddPoint( (*vecCtrlPointX)[j] , (*vecCtrlPointY)[j] , -900 );
+ manModelContour->AddPoint( (*vecCtrlPointX)[j] , (*vecCtrlPointY)[j] , 900 );
//--------------------------------------------------------------------
} // for j
}// ifSliceKeyContourExist
return manModelContour;
-
}
manualContourModel * KernelManagerContour::factoryManualContourModel(int typeContour)
Instant instant(&tempvector);
std::vector<ContourThing**> vectcont = modelManager->getOutlinesAtInstant( &instant );
std::vector<std::string> vectname;
- for(int i = 0; i < vectcont.size(); i++){
+ for(int i = 0; i < (int)(vectcont.size()); i++){
ContourThing **contourthing = vectcont[i];
vectname.push_back((*contourthing)->getName());
}
vtkImageData* KernelManagerContour::getImageAtInstant(std::vector<int> inst){
int index = inst[5]-1;
- if(index < vectimages.size()&&index!=_currentIndex){
+ if(index < (int)(vectimages.size())&&index!=_currentIndex){
_currentIndex=index;
return vectimages[index];
}