86 for(
int i = 0; i < numberOfChannels; i++ )
88 vtkSmartPointer<vtkLSMReader> reader =
89 vtkSmartPointer<vtkLSMReader>::New();
91 reader->SetUpdateChannel( i );
92 reader->SetUpdateTimePoint(iTime);
96 vtkSmartPointer<vtkImageData> image = reader->GetOutput();
99 int type = image->GetScalarSize();
100 double threshold = pow((
double)2, (
int)8*type) - 1;
103 double range = image->GetScalarRange()[1];
110 double random1 = reader->
111 GetChannelColorComponent(i, 0);
112 double value1 = random1;
114 double random2 = reader->
115 GetChannelColorComponent(i, 1);
116 double value2 = random2;
118 double random3 = reader->
119 GetChannelColorComponent(i, 2);
120 double value3 = random3;
122 std::vector<double> color( 4 );
129 vtkSmartPointer<vtkLookupTable> lut =
createLUT(color[0],
134 std::stringstream channelName;
135 channelName <<
"Channel ";
173 for(
int i = 0; i < numberOfChannels; i++ )
175 vtkSmartPointer<vtkLSMReader> reader =
176 vtkSmartPointer<vtkLSMReader>::New();
178 reader->SetUpdateChannel( i );
179 reader->SetUpdateTimePoint(iTime);
183 vtkSmartPointer<vtkImageData> image = reader->GetOutput();
186 GoMegaImageStructureMultiIndexContainer::index<Index>::type::iterator it =
201 setDoppler(
const unsigned int& iTime,
const unsigned int& iPrevious)
222 for(
int i=0; i < dopplerSize; ++i)
224 if(dopplerTime[i] >= 0)
226 vtkSmartPointer<vtkLSMReader> reader =
227 vtkSmartPointer<vtkLSMReader>::New();
230 reader->SetUpdateTimePoint(dopplerTime[i]);
234 vtkSmartPointer<vtkImageData> image = reader->GetOutput();
237 double* rgb = vtkMath::HSVToRGB(
238 static_cast<double>(i)/static_cast<double>(dopplerSize),1,1);
241 std::vector<double> color;
242 color.push_back(rgb[0]*255);
243 color.push_back(rgb[1]*255);
244 color.push_back(rgb[2]*255);
245 color.push_back(255);
248 vtkSmartPointer<vtkLookupTable> lut =
createLUT(color[0],
254 std::stringstream channelName;
256 channelName << dopplerTime[i];
void setReader(vtkLSMReader *iReader)
Set the reader.
unsigned int m_CurrentTimePoint
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 setDoppler(const unsigned int &iTime, const unsigned int &iPrevious)
load all time points of the given channel into the GoMegaImageStructure. Called Doppler View...
virtual void initTimePoint(const unsigned int &iTime)
load all the channels for the given time point into the GoMegaImageStructure
int GetNumberOfTimePoints()
int GetNumberOfChannels()
GoMegaImageStructureMultiIndexContainer m_MegaImageContainer
virtual void setTimePoint(const unsigned int &iTime)
update images from the current GoMegaImageStructure
unsigned int m_TimeInterval
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...
vtkLSMReader * m_LSMReader