30 this->ProcessObject::SetNumberOfRequiredInputs(1);
31 this->ProcessObject::SetNumberOfRequiredOutputs(1);
37 this->ProcessObject::SetNthOutput(0, output.
GetPointer());
47 return static_cast<itk::DataObject*
>(AtmosphericRadiativeTermsType::New().GetPointer());
57 this->GraftNthOutput(0, graft);
67 if (idx >= this->GetNumberOfOutputs())
69 itkExceptionMacro(<<
"Requested to graft output " << idx <<
70 " but this filter only has " << this->GetNumberOfOutputs() <<
" Outputs.");
75 itkExceptionMacro(<<
"Requested to graft output that is a NULL pointer");
93 if (this->GetNumberOfOutputs() < 1)
124 if (this->GetNumberOfInputs() != 1)
142 output->GetValues().clear();
144 WavelengthSpectralBandVectorType WavelengthSpectralBandVector = input->GetWavelengthSpectralBand();
145 unsigned int NbBand = WavelengthSpectralBandVector->Size();
147 double atmosphericReflectance(0.);
148 double atmosphericSphericalAlbedo(0.);
149 double totalGaseousTransmission(0.);
150 double downwardTransmittance(0.);
151 double upwardTransmittance(0.);
152 double upwardDiffuseTransmittance(0.);
153 double upwardDirectTransmittance(0.);
154 double upwardDiffuseTransmittanceForRayleigh(0.);
155 double upwardDiffuseTransmittanceForAerosol(0.);
157 for (
unsigned int i = 0; i < NbBand; ++i)
159 atmosphericReflectance = 0.;
160 atmosphericSphericalAlbedo = 0.;
161 totalGaseousTransmission = 0.;
162 downwardTransmittance = 0.;
163 upwardTransmittance = 0.;
164 upwardDiffuseTransmittance = 0.;
165 upwardDirectTransmittance = 0.;
166 upwardDiffuseTransmittanceForRayleigh = 0.;
167 upwardDiffuseTransmittanceForAerosol = 0.;
169 input->GetSolarZenithalAngle(),
170 input->GetSolarAzimutalAngle(),
171 input->GetViewingZenithalAngle(),
172 input->GetViewingAzimutalAngle(),
175 input->GetAtmosphericPressure(),
176 input->GetWaterVaporAmount(),
177 input->GetOzoneAmount(),
178 input->GetAerosolModel(),
179 input->GetAerosolOptical(),
180 input->GetWavelengthSpectralBand()->GetNthElement(i),
182 atmosphericReflectance,
183 atmosphericSphericalAlbedo,
184 totalGaseousTransmission,
185 downwardTransmittance,
187 upwardDiffuseTransmittance,
188 upwardDirectTransmittance,
189 upwardDiffuseTransmittanceForRayleigh,
190 upwardDiffuseTransmittanceForAerosol
193 output->SetIntrinsicAtmosphericReflectance(i, atmosphericReflectance);
194 output->SetSphericalAlbedo(i, atmosphericSphericalAlbedo);
195 output->SetTotalGaseousTransmission(i, totalGaseousTransmission);
196 output->SetDownwardTransmittance(i, downwardTransmittance);
197 output->SetUpwardTransmittance(i, upwardTransmittance);
198 output->SetUpwardDiffuseTransmittance(i, upwardDiffuseTransmittance);
199 output->SetUpwardDirectTransmittance(i, upwardDirectTransmittance);
200 output->SetUpwardDiffuseTransmittanceForRayleigh(i, upwardDiffuseTransmittanceForRayleigh);
201 output->SetUpwardDiffuseTransmittanceForAerosol(i, upwardDiffuseTransmittanceForAerosol);
202 output->SetWavelengthSpectralBand(i, input->GetWavelengthSpectralBand()->GetNthElement(i)->GetCenterSpectralValue());
213 Superclass::PrintSelf(os, indent);