85 #pragma omp parallel for
87 for(
int kk = 0; kk < n; ++kk )
89 int numberOfChannels = n - ( kk + 1 );
94 vtkSmartPointer<vtkImageData> image =
98 int type = image->GetScalarSize();
99 double threshold = pow((
double)2, (
int)8*type) - 1;
102 double range = image->GetScalarRange()[1];
109 std::vector<std::vector<int> >channelColor =
113 double random1 = channelColor[numberOfChannels][0];
114 double value1 = random1;
116 double random2 = channelColor[numberOfChannels][1];
117 double value2 = random2;
119 double random3 = channelColor[numberOfChannels][2];
120 double value3 = random3;
122 std::vector<double> color( 4 );
129 vtkSmartPointer<vtkLookupTable> lut =
createLUT(color[0],
135 std::stringstream channelName;
136 channelName <<
"Channel ";
137 channelName << numberOfChannels;
179 #pragma omp parallel for
181 for(
int kk = 0; kk < n; kk++ )
183 int numberOfChannels = n - ( kk + 1 );
187 vtkSmartPointer<vtkImageData> image =
191 int type = image->GetScalarSize();
192 double threshold = pow((
double)2, (
int)8*type) - 1;
195 double range = image->GetScalarRange()[1];
201 GoMegaImageStructureMultiIndexContainer::index<Index>::type::iterator it =
216 setDoppler(
const unsigned int& iTime,
const unsigned int& iPrevious)
238 #pragma omp parallel for
240 for(
int i=0; i < DopplerSize; ++i)
242 if(dopplerTime[i] >= 0)
246 vtkSmartPointer<vtkImageData> image =
250 double* rgb = vtkMath::HSVToRGB(
251 static_cast<double>(i)/static_cast<double>(
getDopplerSize()),1,1);
254 std::vector<double> color;
255 color.push_back(rgb[0]*255);
256 color.push_back(rgb[1]*255);
257 color.push_back(rgb[2]*255);
258 color.push_back(255);
261 vtkSmartPointer<vtkLookupTable> lut =
createLUT(color[0],
267 std::stringstream channelName;
269 channelName << dopplerTime[i];
itk::MegaCaptureReader::Pointer m_MegaImageReader
virtual void initTimePoint(const unsigned int &iTime)
load all the channels for the given time point into the GoMegaImageStructure
unsigned int m_CurrentTimePoint
void setReader(itk::MegaCaptureReader::Pointer iReader)
Set the reader.
std::vector< int > getDopplerTime(unsigned int iTime)
change visibility of given structure
unsigned int m_BoundsTime[2]
Convenience structure to store visible image.
unsigned int getDopplerSize()
unsigned int getNumberOfChannels()
unsigned int m_DopplerChannel
unsigned int m_BoundsChannel[2]
virtual void setTimePoint(const unsigned int &iTime)
update images from the current GoMegaImageStructure
GoMegaImageStructureMultiIndexContainer m_MegaImageContainer
unsigned int m_TimeInterval
SmartPointer< Self > Pointer
vtkSmartPointer< vtkLookupTable > createLUT(const double &iRed, const double &iGreen, const double &iBlue, const double &iAlpha)
create a lookuptable (LUT) given r, g, b, a and range LUT will go from black to the color...
virtual void setDoppler(const unsigned int &iTime, const unsigned int &iPrevious)
load all time points of the given channel into the GoMegaImageStructure. Called Doppler View...