Shades of Gray ( episode ) Commander Riker fights for his life in sickbay after he is infected by an alien parasite while on an away - mission . Dr . Pulaski soon discovers that the only way to save Riker ' s life is to force his mind to relive painful memories . " ( Season finale ) " Summary . Teaser . The orbit s an unexplored planet named Surata IV . An away team of Lieutenant Geordi La Forge and Commander Will Riker are on the surface in an alien swamp , teeming with strange lifeform s . La Forge finds Riker sitting on a log , injured . Something has bitten his leg . La Forge , not taking any chances with alien biology on a world unknown to the , calls for the transporter . Transporter Chief O ' Brien delays , getting an alert signal from the biofilter in the transporter , as Riker ' s body has been infected with some type of unidentified microbe s . Doctor Pulaski is summoned , as the chief medical officer must authorize any transportation of unfiltered biomaterial . Pulaski reluctantly uses the transporter – a rare occasion for her – to beam down and verify if it is safe to bring Riker aboard . She materializes and inspects Riker ' s wound with her tricorder . He complains of no pain , but of a numbness near the bite . La Forge hasn ' t had any luck finding what might have infected the wound . Pulaski beams them directly to sickbay . Two medical orderlies help Riker to the bed . He tries to shrug off their help , but when he takes a step his leg suddenly gives out . Act One . Captain Picard records a log entry detailing Riker ' s predicament . He chides Riker for putting his foot where it didn ' t belong , but Riker maintains he is just trying to keep the doctors busy . Pulaski informs them that Riker ' s nervous system is being invaded by a microbe which combines elements of both a virus and a bacteria . She uses a medical scanner to illustrate the microbes bonding themselves to Riker ' s sciatic nerve and multiplying . They are not damaging his nerves , just preventing them from functioning - and they are progressing towards his brain . Meanwhile , Picard decides to send La Forge and Lt . Commander Data to the surface to locate the source of the infection . Data protests at risking La Forge for the mission . However , La Forge tells him that he knows exactly where Riker was standing when he was injured . Data , using his android reflexes , prevents his Human friend from being hurt . They find a thorned vine in the swamp using parasites to paralyze animal life . Data records significant fossil remains around the area of the vines , which , judging by their fast motion attacking La Forge , are predatory in nature . When La Forge cuts off the thorn , the vine writhes in ( futile ) resistance . The officer s call O ' Brien for a beam - out and the thorn sample is delivered to sickbay while Data reports on the predatory nature of the vines to the captain . Act Two . Pulaski is hard at work analyzing the samples and Riker ' s condition , but is unable to find what characteristic in Human nerves causes the microbes to thrive . Riker is continuing to grow more numb , but acts stoic when Picard expresses regret at Riker ' s condition . As Counselor Deanna Troi watches unseen , Riker even tries to cheer up the medical technician s with stories . Troi attempts to reach out to her " imzadi " , but Riker soon falls unconscious . Pulaski attempts to stabilize him , but estimates he will die within an hour . In order to prolong Riker ' s life , Pulaski puts him into a neural stimulator , hopefully keeping them active and resisting the virus . This causes Riker to dream of his past adventures aboard the " Enterprise " . Act Three . At first , Riker ' s dreams are of reasonably neutral occasions , such as his first meeting with Data in the holodeck and his attempt to help Wesley with meeting Salia . He also remembers saying goodbye to Deanna when he considered the promotion . Soon , his dreams become more pleasurable , perhaps even erotic , including meeting the cheerful young Edo women on Rubicun III , or the matriarch Beata on Angel I , the attractive Bringloidi woman Brenna Odell , and the computer - generated holodeck woman Minuet . However , while pleasing to Riker ' s mind , the passionate dreams actually worsen Riker ' s condition , with the organism ' s growth rate doubled . Act Four . It is apparent that the organisms are sensitive to the nature of the dreams Riker is having . Pulaski hypothesizes that they are sensitive to brain endorphins , with positive endorphins attracting them . Pulaski and Troi therefore agree to try to make the machine evoke negative dreams instead . Riker then experiences dreams of the death of Lieutenant Natasha Yar and the apparent death of Troi ' s child Ian . Sure enough , this has the desired effect , as the negative endorphins drive the bacterio - virus growth down , but these endorphins are not strong enough . Pulaski tries again , using the machine to evoke dreams of raw , primitive feelings of fear and survival . Riker then dreams of his experience aboard the " Pagh " , then fighting the parasite - infested Admiral Quinn . The growth rate now decreases significantly , but still not enough . Pulaski can focus her beam even tighter , but Riker is now very weak . Troi says they have no choice but to proceed . Act Five . With Riker ' s vital signs very weak , Pulaski tries yet again . Riker is now dreaming more quickly through memories of pain , of T ' Jon ' s attack on him , then being attacked by the Ferengi on Delphi Ardu IV and being enveloped by the tar creature Armus . The organism ' s growth rate is now very low , but still too high . His blood pressure dropping , Pulaski calls for the tricordrazine . Riker now remembers tense situations , like setting the " Enterprise " auto - destruct sequence , saving the Klingons from the Talarian freighter that was about to explode . The organism ' s growth rate continues to decrease , but it needs to decrease even more . He relives his memories again at a much quicker pace , but also his encountering the neural parasite ' s mother creature , Data repairing the ship which was about to explode , the killing of one of the inhabitants of Solais V , the destruction of the and the . Finally , the treatment eradicates the infection once and for all . Riker ' s vital signs head back to normal . Riker recovers to his well - adjusted , humorous self . Pulaski asks him who he is , and , seeing Picard walk in , he wittingly says he is Captain Jean - Luc Picard of the USS " Enterprise " . Picard in turn refers to Data as " Admiral " , saying they were worried about him . Data obviously doesn ' t get it . Memorable quotes . " " I hope these are the right coordinates . Just kidding , doctor . I know how much you love the transporter . " " " " About as much as I love comical transporter chiefs . " " " " Let ' s try something . Maybe it likes Humans more than androids . " " " " If you are correct , you are placing yourself in grave danger . " " " " Well , I ' m counting on those great android . . . " " " " . . . reflexes of yours . " " " " For Commander Riker ' s sake , I hope my hypothesis is in error . " " " " Unfortunately Commander Data , your hypotheses rarely are . " " " " They ' re waiting on me hand and foot . I just . . . I hope they don ' t find out that I ' m faking it . " " " " I wish you were faking it . " " " " If you drop a hammer on your foot , it ' s hardly useful to get mad at the hammer . " " " " Deanna , facing death is the ultimate test of character . I don ' t want to die but if I have to do , I ' d like to do it with a little pride . " " " " My great - grandfather was once bitten by a rattlesnake . After three days of intense pain , the snake died . " " " " There may be some residual memory loss . I just want to be certain that you still know who you are . " " " " Of course I know who I am . I ' m Captain Jean - Luc Picard of the USS " Enterprise " . " " " " I ' m delighted that you ' re feeling better . . . captain . The admiral and I were worried about you . " " " " Captain , I do not believe you have the authority to promote me to the rank of admiral . " " Links and references . References . autonomic nervous system ; bacteria ; biofilter ; brain ; ; composite neural profile ; EEG ; endorphin ; exobiology ; fossil ; graveyard ; " imzadi " ; kilometer ; line ; medical tricorder ; Milky Way Galaxy ; nervous system ; neuron ; number one ; patient ; Pinocchio ; probability mechanics ; rattlesnake ; REM sleep ; Riker ' s great - grandfather ; sciatic nerve ; Surata IV ; Surata IV predatory vine ; Surata microbe ; transporter chief ; tricorder ; tricordrazine ; virus